PostgreSQL SQL Scripts to create and populate a PostgreSQL database with a SNOMED CT terminology release
- PostgreSQL v.9
PostgreSQL is an ORDBMS therefore every Database is self-contained object. A "database" contains logins, one or more schemas, groups, etc. and every conection is related to a sigle database.
- PostgreSQL does not need
engine=myisamwhich by itself is a bit strange asmyisamdoes not support foreign keys. - Changes
databaseforschema - using the
uniqueconstraint instead ofkey
run load_release-postgresql.sh
eg ./load_release-postgresql.sh ~/Backup/SnomedCT_RF2Release_INT_20150731.zip SCT_20150731 SNAP
Note that the scripted installation will now support loading other Editions. The script asks for a module identifier, which is INT by default, for the international edition. Loading the US Edition, for example, would work as follows: Enter module string used in filenames [INT]: US1000124
- Download the SNOMED CT terminology release from the IHTSDO web site
- Create the database using the db create-database-postgres.sql script or skip/perform this action manually if you'd like the data to be loaded into a existing/different database.
- Create the tables using the db appropriate environment.sql script. The default file creates tables for full, snapshot and delta files and there's also a -full-only version.
- Edit the db appropriate load.sql script with the correct location of the SNOMED CT release files An alternative under unix or mac would be to create a symlink to the appropriate directory eg
ln -s /your/snomed/directory RF2Release - Load the database created using the edited load.sql script from the relevant command prompt, again by default for full, snapshot and delta unless you only want the full version.