Search



Page tree

  

The first step is to create the database schema. The code below is an excerpt from the SNOMED CT example database MySQL import script which carries out the following steps:

  • Creates a database called "snomedct"
  • Sets the default character set of the database as "utf8mb4"
  • Sets snomedct as the default database for the following script.
  • Sets timeouts appropriate to the import process.
  • Clears sql_mode settings some of which, if present, may cause import issues.
Create SNOMED CT Database
DELIMITER ;
SELECT Now() `--`,"Create Database and Initialize" '--';
-- CREATE DATABASE
DROP DATABASE IF EXISTS `snomedct`; 
CREATE DATABASE `snomedct` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `snomedct`;
-- INITIALIZE SETTINGS
SET GLOBAL net_write_timeout = 60;
SET GLOBAL net_read_timeout=120;
SET GLOBAL sql_mode ='';
SET SESSION sql_mode ='';



Feedback
  • No labels