Added MySQL Migration for CDM.
This commit is contained in:
parent
3c57874b26
commit
5ac6092584
|
@ -26,11 +26,12 @@
|
||||||
####### # # ####### # ##### ###### # # ## ##### ##### #### # # #### # # # # # # # # # ####
|
####### # # ####### # ##### ###### # # ## ##### ##### #### # # #### # # # # # # # # # ####
|
||||||
|
|
||||||
|
|
||||||
script to create constraints within OMOP common data model, version 5.0 for PostgreSQL database
|
script to create constraints within OMOP common data model, version 5.0 for MySQL database
|
||||||
|
|
||||||
last revised: 12 Oct 2014
|
last revised: 03 Mar 2015
|
||||||
|
|
||||||
author: Patrick Ryan
|
original author: Patrick Ryan
|
||||||
|
modified by Colin Erdman for MySQL;
|
||||||
|
|
||||||
|
|
||||||
*************************/
|
*************************/
|
||||||
|
|
|
@ -26,12 +26,12 @@
|
||||||
####### # # ####### # ##### ###### # # ## #####
|
####### # # ####### # ##### ###### # # ## #####
|
||||||
|
|
||||||
|
|
||||||
script to create OMOP common data model, version 5.0 for PostgreSQL database
|
script to create OMOP common data model, version 5.0 for MySQL database
|
||||||
|
|
||||||
last revised: 12 Oct 2014
|
last revised: 03 Mar 2015
|
||||||
|
|
||||||
author: Patrick Ryan
|
|
||||||
|
|
||||||
|
original author: Patrick Ryan
|
||||||
|
modified by Colin Erdman for MySQL;
|
||||||
|
|
||||||
*************************/
|
*************************/
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,12 @@
|
||||||
####### # # ####### # ##### ###### # # ## ##### ### # # ##### ###### # # ###### ####
|
####### # # ####### # ##### ###### # # ## ##### ### # # ##### ###### # # ###### ####
|
||||||
|
|
||||||
|
|
||||||
script to create the required indexes within OMOP common data model, version 5.0 for PostgreSQL database
|
script to create the required indexes within OMOP common data model, version 5.0 for MySQL database
|
||||||
|
|
||||||
last revised: 12 Oct 2014
|
last revised: 03 Mar 2015
|
||||||
|
|
||||||
author: Patrick Ryan
|
original author: Patrick Ryan
|
||||||
|
modified by Colin Erdman for MySQL;
|
||||||
|
|
||||||
description: These indices are considered a minimal requirement to ensure adequate performance of analyses.
|
description: These indices are considered a minimal requirement to ensure adequate performance of analyses.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
Common-Data-Model / PostgreSQL
|
Common-Data-Model / MySQL
|
||||||
=================
|
=================
|
||||||
|
|
||||||
This folder contains the SQL scripts for PostgreSQL.
|
This folder contains the SQL scripts for MySQL. This was tested with MySQL v5.6.
|
||||||
|
|
||||||
|
Note: This was derived from the Postgres migration. Performance has not been tested.
|
||||||
|
|
||||||
In order to create your instantiation of the Common Data Model, we recommend following these steps:
|
In order to create your instantiation of the Common Data Model, we recommend following these steps:
|
||||||
|
|
||||||
|
@ -11,8 +13,10 @@ In order to create your instantiation of the Common Data Model, we recommend fol
|
||||||
|
|
||||||
3. Load your data into the schema.
|
3. Load your data into the schema.
|
||||||
|
|
||||||
4. Execute the script `OMOP CDM indexes required - PostgreSQL.sql` to add the minimum set of indexes we recommend (required before fk creation in MySQL).
|
4. Execute the script `OMOP CDM indexes required - MySQL.sql` to add the minimum set of indexes we recommend (required before fk creation in MySQL).
|
||||||
|
|
||||||
5. Execute the script `OMOP CDM constraints - PostgreSQL.sql` to add the constraints (primary and foreign keys).
|
5. Execute the script `OMOP CDM constraints - MySQL.sql` to add the constraints (primary and foreign keys).
|
||||||
|
|
||||||
Note: you could also apply the constraints and/or the indexes before loading the data, but this will slow down the insertion of the data considerably.
|
Note: you could also apply the constraints and/or the indexes before loading the data, but this will slow down the insertion of the data considerably.
|
||||||
|
|
||||||
|
Note: There is a possibility depending on configuration / foreign_key_check setting that one would need to load the data after schema creation.
|
||||||
|
|
Loading…
Reference in New Issue