The various SQL scripts in this directory provide various ways to (re)build an ISOcat database: 1) create an empty ISOcat database (but with default values in place): -1- ISOcat-schema-empty.sql -2- ISOcat-schema-constraints.sql -3- ISOcat-schema-init.sql 2) create an ISOcat database to import data from another instance -1- ISOcat-schema-empty.sql -2- ... import the data only dump of the other database ... -3- ISOcat-schema-constraints.sql -4- ISOcat-schema-finish.sql Use the ISOcat-schema-drop.sql script to drop all the tables/sequences/..., this should result in an empty database. The other scripts: -1- ISOcat-schema-triggers.sql -2- ISOcat-schema-views.sql -3- ISOcat-schema-functions.sql -4- ISOcat-schema-enums.sql are for convenience, as they are easier to edit then the ones generated by pgAdmin in ISOcat-schema-empty.sql and ISOcat-schema-constraints.sql. When creating a fresh schema dump, split the generated file over ISOcat-schema-empty.sql and ISOcat-schema-constraints.sql. The split point is the first 'ADD CONSTRAINT' statement. This split is needed because otherwise a data dump can't be loaded, as such a dump doesn't neccesarily provide the data in an order that satisifies the constraints.