Proof of concept files for an implementation of an information model for complex natural science collections objects.
Example to illustrate a manuscript by Morris, Macklin, Kelly, and Tocci and for discussion by the DINA consortium.
DDL for a minimal example (entirely proof of concept) schema is in:
src/main/resources/edu/harvard/huh/specify/datamodel/cco_poc/db/tables.sql and
src/main/resources/edu/harvard/huh/specify/datamodel/cco_poc/db/changes.sql
DDL for a much more complete schema suitable for implementation is in:
src/main/resources/edu/harvard/huh/specify/datamodel/cco_full/db/tables.sql
Example data illustrating intended use of the schema for various sorts of simple and complex collections data is in:
src/main/resources/edu/harvard/huh/specify/datamodel/cco_full/db/exampledata.sql
The outline of a human readable information model is at:
src/main/resources/edu/harvard/huh/specify/datamodel/cco_full/model/model.md
mysql> drop database cco_full;
mysql> create database cco_full;
$ cd src/main/resources/edu_harvard/huh/specify/datamodel/cco_full/db/
$ mysql -p cco_full < tables.sql
$ mysql -p cco_full < functions.sql
$ mysql -p cco_full < baselinedata.sql
$ mysql -p cco_full < exampledata.sql
This draft incorporates liquibase markup, but it should not yet be considered stable - you must drop and create a new database from scratch with each update.
The default database should be MySQL in this repo, defined in the file liquibase.properties
You MUST create the database 'cco_full' before running the project.
mysql> drop database cco_full;
mysql> create database cco_full;
At this time there is support for 2 DBMSes (MariaDB/MySQL and postgresql).
The basic configuration is in the following 2 template files in the config directory, you must copy one of these to config/liquibase_cco_full.properties, and then provide your user credentials.
config/liquibase_cco_full.properties is in .gitignore and should not be put under version control (as it contains your credentials).
You must copy the config/liquibase_cco_full.properties.mysqltemplate to config/liquibase_cco_full.properties, and then add your credentials to the file.
$ cp config/liquibase_cco_full.properties.mysqltemplate config/liquibase_cco_full.properties
$ vim config/liquibase_cco_full.properties
replace liquibase_cco_full.properties with the liquibase_cco_full.properties.postgrestemplate.
$ cp config/liquibase_cco_full.properties.postgresqltemplate config/liquibase_cco_full.properties $ vim config/liquibase_cco_full.properties
To run the project type 'mvn clean install' in the same directory that the pom.xml-file resides. You must have first met the prerequisites listed above, including creating the database schema and having copied a template to config/liquibase_cco_full.properties and added your database credentials to that file.
mvn clean install
If you wish to include the examples, use the cco_full_examples profile instead:
mvn clean install -P cco_full_examples