-- This CLP file was created using DB2LOOK Version 8.2
-- Timestamp: Thu 23 Apr 2009 12:10:41 PM PDT
-- Database Name: TBASE2         
-- Database Manager Version: DB2/LINUX Version 8.2.0       
-- Database Codepage: 819
-- Database Collating Sequence is: UNIQUE


CONNECT TO TBASE2 USER tbase2;


---------------------------------
-- for existing granted privileges, excluding the original definer of the object
---------------------------------


CREATE SEQUENCE "JRUAN   "."HIBERNATE_SEQUENCE" AS INTEGER
	MINVALUE 1 MAXVALUE 2147483647
	START WITH 1 INCREMENT BY 1
	CACHE 20 NO CYCLE NO ORDER;
CREATE SEQUENCE "TBASE2  "."HIBERNATE_SEQUENCE" AS INTEGER
	MINVALUE 1 MAXVALUE 2147483647
	START WITH 1 INCREMENT BY 1
	CACHE 20 NO CYCLE NO ORDER;
CREATE SEQUENCE "TBASE2TEST"."HIBERNATE_SEQUENCE" AS INTEGER
	MINVALUE 1 MAXVALUE 2147483647
	START WITH 1 INCREMENT BY 1
	CACHE 20 NO CYCLE NO ORDER;

------------------------------------------------
-- DDL Statements for table "JRUAN   "."EXPLAIN_INSTANCE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."EXPLAIN_INSTANCE"  (
		  "EXPLAIN_REQUESTER" VARCHAR(128) NOT NULL , 
		  "EXPLAIN_TIME" TIMESTAMP NOT NULL , 
		  "SOURCE_NAME" VARCHAR(128) NOT NULL , 
		  "SOURCE_SCHEMA" VARCHAR(128) NOT NULL , 
		  "SOURCE_VERSION" VARCHAR(64) NOT NULL , 
		  "EXPLAIN_OPTION" CHAR(1) NOT NULL , 
		  "SNAPSHOT_TAKEN" CHAR(1) NOT NULL , 
		  "DB2_VERSION" CHAR(7) NOT NULL , 
		  "SQL_TYPE" CHAR(1) NOT NULL , 
		  "QUERYOPT" INTEGER NOT NULL , 
		  "BLOCK" CHAR(1) NOT NULL , 
		  "ISOLATION" CHAR(2) NOT NULL , 
		  "BUFFPAGE" INTEGER NOT NULL , 
		  "AVG_APPLS" INTEGER NOT NULL , 
		  "SORTHEAP" INTEGER NOT NULL , 
		  "LOCKLIST" INTEGER NOT NULL , 
		  "MAXLOCKS" SMALLINT NOT NULL , 
		  "LOCKS_AVAIL" INTEGER NOT NULL , 
		  "CPU_SPEED" DOUBLE NOT NULL , 
		  "REMARKS" VARCHAR(254) , 
		  "DBHEAP" INTEGER NOT NULL , 
		  "COMM_SPEED" DOUBLE NOT NULL , 
		  "PARALLELISM" CHAR(2) NOT NULL , 
		  "DATAJOINER" CHAR(1) NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."EXPLAIN_INSTANCE"

ALTER TABLE "JRUAN   "."EXPLAIN_INSTANCE" 
	ADD CONSTRAINT "SQL050919121810910" PRIMARY KEY
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."EXPLAIN_STATEMENT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."EXPLAIN_STATEMENT"  (
		  "EXPLAIN_REQUESTER" VARCHAR(128) NOT NULL , 
		  "EXPLAIN_TIME" TIMESTAMP NOT NULL , 
		  "SOURCE_NAME" VARCHAR(128) NOT NULL , 
		  "SOURCE_SCHEMA" VARCHAR(128) NOT NULL , 
		  "SOURCE_VERSION" VARCHAR(64) NOT NULL , 
		  "EXPLAIN_LEVEL" CHAR(1) NOT NULL , 
		  "STMTNO" INTEGER NOT NULL , 
		  "SECTNO" INTEGER NOT NULL , 
		  "QUERYNO" INTEGER NOT NULL , 
		  "QUERYTAG" CHAR(20) NOT NULL , 
		  "STATEMENT_TYPE" CHAR(2) NOT NULL , 
		  "UPDATABLE" CHAR(1) NOT NULL , 
		  "DELETABLE" CHAR(1) NOT NULL , 
		  "TOTAL_COST" DOUBLE NOT NULL , 
		  "STATEMENT_TEXT" CLOB(2097152) NOT LOGGED NOT COMPACT NOT NULL , 
		  "SNAPSHOT" BLOB(10485760) NOT LOGGED NOT COMPACT , 
		  "QUERY_DEGREE" INTEGER NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."EXPLAIN_STATEMENT"

ALTER TABLE "JRUAN   "."EXPLAIN_STATEMENT" 
	ADD CONSTRAINT "SQL050919121810940" PRIMARY KEY
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."EXPLAIN_OPERATOR"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."EXPLAIN_OPERATOR"  (
		  "EXPLAIN_REQUESTER" VARCHAR(128) NOT NULL , 
		  "EXPLAIN_TIME" TIMESTAMP NOT NULL , 
		  "SOURCE_NAME" VARCHAR(128) NOT NULL , 
		  "SOURCE_SCHEMA" VARCHAR(128) NOT NULL , 
		  "SOURCE_VERSION" VARCHAR(64) NOT NULL , 
		  "EXPLAIN_LEVEL" CHAR(1) NOT NULL , 
		  "STMTNO" INTEGER NOT NULL , 
		  "SECTNO" INTEGER NOT NULL , 
		  "OPERATOR_ID" INTEGER NOT NULL , 
		  "OPERATOR_TYPE" CHAR(6) NOT NULL , 
		  "TOTAL_COST" DOUBLE NOT NULL , 
		  "IO_COST" DOUBLE NOT NULL , 
		  "CPU_COST" DOUBLE NOT NULL , 
		  "FIRST_ROW_COST" DOUBLE NOT NULL , 
		  "RE_TOTAL_COST" DOUBLE NOT NULL , 
		  "RE_IO_COST" DOUBLE NOT NULL , 
		  "RE_CPU_COST" DOUBLE NOT NULL , 
		  "COMM_COST" DOUBLE NOT NULL , 
		  "FIRST_COMM_COST" DOUBLE NOT NULL , 
		  "BUFFERS" DOUBLE NOT NULL , 
		  "REMOTE_TOTAL_COST" DOUBLE NOT NULL , 
		  "REMOTE_COMM_COST" DOUBLE NOT NULL )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."EXPLAIN_OBJECT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."EXPLAIN_OBJECT"  (
		  "EXPLAIN_REQUESTER" VARCHAR(128) NOT NULL , 
		  "EXPLAIN_TIME" TIMESTAMP NOT NULL , 
		  "SOURCE_NAME" VARCHAR(128) NOT NULL , 
		  "SOURCE_SCHEMA" VARCHAR(128) NOT NULL , 
		  "SOURCE_VERSION" VARCHAR(64) NOT NULL , 
		  "EXPLAIN_LEVEL" CHAR(1) NOT NULL , 
		  "STMTNO" INTEGER NOT NULL , 
		  "SECTNO" INTEGER NOT NULL , 
		  "OBJECT_SCHEMA" VARCHAR(128) NOT NULL , 
		  "OBJECT_NAME" VARCHAR(128) NOT NULL , 
		  "OBJECT_TYPE" CHAR(2) NOT NULL , 
		  "CREATE_TIME" TIMESTAMP , 
		  "STATISTICS_TIME" TIMESTAMP , 
		  "COLUMN_COUNT" SMALLINT NOT NULL , 
		  "ROW_COUNT" BIGINT NOT NULL , 
		  "WIDTH" INTEGER NOT NULL , 
		  "PAGES" INTEGER NOT NULL , 
		  "DISTINCT" CHAR(1) NOT NULL , 
		  "TABLESPACE_NAME" VARCHAR(128) , 
		  "OVERHEAD" DOUBLE NOT NULL , 
		  "TRANSFER_RATE" DOUBLE NOT NULL , 
		  "PREFETCHSIZE" INTEGER NOT NULL , 
		  "EXTENTSIZE" INTEGER NOT NULL , 
		  "CLUSTER" DOUBLE NOT NULL , 
		  "NLEAF" INTEGER NOT NULL , 
		  "NLEVELS" INTEGER NOT NULL , 
		  "FULLKEYCARD" BIGINT NOT NULL , 
		  "OVERFLOW" INTEGER NOT NULL , 
		  "FIRSTKEYCARD" BIGINT NOT NULL , 
		  "FIRST2KEYCARD" BIGINT NOT NULL , 
		  "FIRST3KEYCARD" BIGINT NOT NULL , 
		  "FIRST4KEYCARD" BIGINT NOT NULL , 
		  "SEQUENTIAL_PAGES" INTEGER NOT NULL , 
		  "DENSITY" INTEGER NOT NULL , 
		  "STATS_SRC" CHAR(1) NOT NULL , 
		  "AVERAGE_SEQUENCE_GAP" DOUBLE NOT NULL , 
		  "AVERAGE_SEQUENCE_FETCH_GAP" DOUBLE NOT NULL , 
		  "AVERAGE_SEQUENCE_PAGES" DOUBLE NOT NULL , 
		  "AVERAGE_SEQUENCE_FETCH_PAGES" DOUBLE NOT NULL , 
		  "AVERAGE_RANDOM_PAGES" DOUBLE NOT NULL , 
		  "AVERAGE_RANDOM_FETCH_PAGES" DOUBLE NOT NULL , 
		  "NUMRIDS" BIGINT NOT NULL , 
		  "NUMRIDS_DELETED" BIGINT NOT NULL , 
		  "NUM_EMPTY_LEAFS" BIGINT NOT NULL , 
		  "ACTIVE_BLOCKS" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."EXPLAIN_PREDICATE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."EXPLAIN_PREDICATE"  (
		  "EXPLAIN_REQUESTER" VARCHAR(128) NOT NULL , 
		  "EXPLAIN_TIME" TIMESTAMP NOT NULL , 
		  "SOURCE_NAME" VARCHAR(128) NOT NULL , 
		  "SOURCE_SCHEMA" VARCHAR(128) NOT NULL , 
		  "SOURCE_VERSION" VARCHAR(64) NOT NULL , 
		  "EXPLAIN_LEVEL" CHAR(1) NOT NULL , 
		  "STMTNO" INTEGER NOT NULL , 
		  "SECTNO" INTEGER NOT NULL , 
		  "OPERATOR_ID" INTEGER NOT NULL , 
		  "PREDICATE_ID" INTEGER NOT NULL , 
		  "HOW_APPLIED" CHAR(5) NOT NULL , 
		  "WHEN_EVALUATED" CHAR(3) NOT NULL , 
		  "RELOP_TYPE" CHAR(2) NOT NULL , 
		  "SUBQUERY" CHAR(1) NOT NULL , 
		  "FILTER_FACTOR" DOUBLE NOT NULL , 
		  "PREDICATE_TEXT" CLOB(2097152) NOT LOGGED NOT COMPACT )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."EXPLAIN_ARGUMENT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."EXPLAIN_ARGUMENT"  (
		  "EXPLAIN_REQUESTER" VARCHAR(128) NOT NULL , 
		  "EXPLAIN_TIME" TIMESTAMP NOT NULL , 
		  "SOURCE_NAME" VARCHAR(128) NOT NULL , 
		  "SOURCE_SCHEMA" VARCHAR(128) NOT NULL , 
		  "SOURCE_VERSION" VARCHAR(64) NOT NULL , 
		  "EXPLAIN_LEVEL" CHAR(1) NOT NULL , 
		  "STMTNO" INTEGER NOT NULL , 
		  "SECTNO" INTEGER NOT NULL , 
		  "OPERATOR_ID" INTEGER NOT NULL , 
		  "ARGUMENT_TYPE" CHAR(8) NOT NULL , 
		  "ARGUMENT_VALUE" VARCHAR(1024) , 
		  "LONG_ARGUMENT_VALUE" CLOB(2097152) NOT LOGGED NOT COMPACT )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."EXPLAIN_STREAM"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."EXPLAIN_STREAM"  (
		  "EXPLAIN_REQUESTER" VARCHAR(128) NOT NULL , 
		  "EXPLAIN_TIME" TIMESTAMP NOT NULL , 
		  "SOURCE_NAME" VARCHAR(128) NOT NULL , 
		  "SOURCE_SCHEMA" VARCHAR(128) NOT NULL , 
		  "SOURCE_VERSION" VARCHAR(64) NOT NULL , 
		  "EXPLAIN_LEVEL" CHAR(1) NOT NULL , 
		  "STMTNO" INTEGER NOT NULL , 
		  "SECTNO" INTEGER NOT NULL , 
		  "STREAM_ID" INTEGER NOT NULL , 
		  "SOURCE_TYPE" CHAR(1) NOT NULL , 
		  "SOURCE_ID" INTEGER NOT NULL , 
		  "TARGET_TYPE" CHAR(1) NOT NULL , 
		  "TARGET_ID" INTEGER NOT NULL , 
		  "OBJECT_SCHEMA" VARCHAR(128) , 
		  "OBJECT_NAME" VARCHAR(128) , 
		  "STREAM_COUNT" DOUBLE NOT NULL , 
		  "COLUMN_COUNT" SMALLINT NOT NULL , 
		  "PREDICATE_ID" INTEGER NOT NULL , 
		  "COLUMN_NAMES" CLOB(2097152) NOT LOGGED NOT COMPACT , 
		  "PMID" SMALLINT NOT NULL , 
		  "SINGLE_NODE" CHAR(5) , 
		  "PARTITION_COLUMNS" CLOB(2097152) NOT LOGGED NOT COMPACT )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ADVISE_INDEX"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ADVISE_INDEX"  (
		  "EXPLAIN_REQUESTER" VARCHAR(128) NOT NULL WITH DEFAULT '' , 
		  "EXPLAIN_TIME" TIMESTAMP NOT NULL WITH DEFAULT CURRENT TIMESTAMP , 
		  "SOURCE_NAME" VARCHAR(128) NOT NULL WITH DEFAULT '' , 
		  "SOURCE_SCHEMA" VARCHAR(128) NOT NULL WITH DEFAULT '' , 
		  "SOURCE_VERSION" VARCHAR(64) NOT NULL WITH DEFAULT '' , 
		  "EXPLAIN_LEVEL" CHAR(1) NOT NULL WITH DEFAULT '' , 
		  "STMTNO" INTEGER NOT NULL WITH DEFAULT 0 , 
		  "SECTNO" INTEGER NOT NULL WITH DEFAULT 0 , 
		  "QUERYNO" INTEGER NOT NULL WITH DEFAULT 0 , 
		  "QUERYTAG" CHAR(20) NOT NULL WITH DEFAULT '' , 
		  "NAME" VARCHAR(128) NOT NULL , 
		  "CREATOR" VARCHAR(128) NOT NULL WITH DEFAULT '' , 
		  "TBNAME" VARCHAR(128) NOT NULL , 
		  "TBCREATOR" VARCHAR(128) NOT NULL WITH DEFAULT '' , 
		  "COLNAMES" CLOB(2097152) LOGGED NOT COMPACT NOT NULL , 
		  "UNIQUERULE" CHAR(1) NOT NULL WITH DEFAULT '' , 
		  "COLCOUNT" SMALLINT NOT NULL WITH DEFAULT 0 , 
		  "IID" SMALLINT NOT NULL WITH DEFAULT 0 , 
		  "NLEAF" INTEGER NOT NULL WITH DEFAULT 0 , 
		  "NLEVELS" SMALLINT NOT NULL WITH DEFAULT 0 , 
		  "FIRSTKEYCARD" BIGINT NOT NULL WITH DEFAULT 0 , 
		  "FULLKEYCARD" BIGINT NOT NULL WITH DEFAULT 0 , 
		  "CLUSTERRATIO" SMALLINT NOT NULL WITH DEFAULT 0 , 
		  "CLUSTERFACTOR" DOUBLE NOT NULL WITH DEFAULT 0 , 
		  "USERDEFINED" SMALLINT NOT NULL WITH DEFAULT 0 , 
		  "SYSTEM_REQUIRED" SMALLINT NOT NULL WITH DEFAULT 0 , 
		  "CREATE_TIME" TIMESTAMP NOT NULL WITH DEFAULT CURRENT TIMESTAMP , 
		  "STATS_TIME" TIMESTAMP WITH DEFAULT CURRENT TIMESTAMP , 
		  "PAGE_FETCH_PAIRS" VARCHAR(254) NOT NULL WITH DEFAULT '' , 
		  "REMARKS" VARCHAR(254) WITH DEFAULT '' , 
		  "DEFINER" VARCHAR(128) NOT NULL WITH DEFAULT '' , 
		  "CONVERTED" CHAR(1) NOT NULL WITH DEFAULT '' , 
		  "SEQUENTIAL_PAGES" INTEGER NOT NULL WITH DEFAULT 0 , 
		  "DENSITY" INTEGER NOT NULL WITH DEFAULT 0 , 
		  "FIRST2KEYCARD" BIGINT NOT NULL WITH DEFAULT 0 , 
		  "FIRST3KEYCARD" BIGINT NOT NULL WITH DEFAULT 0 , 
		  "FIRST4KEYCARD" BIGINT NOT NULL WITH DEFAULT 0 , 
		  "PCTFREE" SMALLINT NOT NULL WITH DEFAULT -1 , 
		  "UNIQUE_COLCOUNT" SMALLINT NOT NULL WITH DEFAULT -1 , 
		  "MINPCTUSED" SMALLINT NOT NULL WITH DEFAULT 0 , 
		  "REVERSE_SCANS" CHAR(1) NOT NULL WITH DEFAULT 'N' , 
		  "USE_INDEX" CHAR(1) , 
		  "CREATION_TEXT" CLOB(2097152) NOT LOGGED NOT COMPACT NOT NULL WITH DEFAULT '' , 
		  "PACKED_DESC" BLOB(1048576) NOT LOGGED NOT COMPACT )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ADVISE_WORKLOAD"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ADVISE_WORKLOAD"  (
		  "WORKLOAD_NAME" CHAR(128) NOT NULL WITH DEFAULT 'WK0' , 
		  "STATEMENT_NO" INTEGER NOT NULL WITH DEFAULT 1 , 
		  "STATEMENT_TEXT" CLOB(2097152) NOT LOGGED NOT COMPACT NOT NULL , 
		  "STATEMENT_TAG" VARCHAR(256) NOT NULL WITH DEFAULT '' , 
		  "FREQUENCY" INTEGER NOT NULL WITH DEFAULT 1 , 
		  "IMPORTANCE" DOUBLE NOT NULL WITH DEFAULT 1 , 
		  "WEIGHT" DOUBLE NOT NULL WITH DEFAULT 1 , 
		  "COST_BEFORE" DOUBLE , 
		  "COST_AFTER" DOUBLE , 
		  "COMPILABLE" CHAR(17) )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."GEOSPOT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."GEOSPOT"  (
		  "GEOSPOT_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "ELEVATION" DOUBLE , 
		  "LATITUDE" DOUBLE , 
		  "LONGITUDE" DOUBLE , 
		  "NAME" VARCHAR(255) , 
		  "NOTES" VARCHAR(2000) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."GEOSPOT"

ALTER TABLE "JRUAN   "."GEOSPOT" 
	ADD PRIMARY KEY
		("GEOSPOT_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."SPECIMENLABEL"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."SPECIMENLABEL"  (
		  "SPECIMENLABEL_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "GENBANKID" VARCHAR(255) , 
		  "MUSEUMNUMBER" VARCHAR(255) , 
		  "TISSUE" VARCHAR(255) , 
		  "GEOSPOT_ID" BIGINT , 
		  "STUDY_ID" BIGINT NOT NULL , 
		  "TAXON_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."SPECIMENLABEL"

ALTER TABLE "JRUAN   "."SPECIMENLABEL" 
	ADD PRIMARY KEY
		("SPECIMENLABEL_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ALGORITHM"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ALGORITHM"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "ALGORITHM_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(2000) , 
		  "PROPERTYNAME" VARCHAR(255) , 
		  "PROPERTYVALUE" VARCHAR(255) , 
		  "USERTYPE_ID" BIGINT , 
		  "GAPMODE_ID" BIGINT , 
		  "POLYTCOUNT_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."ALGORITHM"

ALTER TABLE "JRUAN   "."ALGORITHM" 
	ADD PRIMARY KEY
		("ALGORITHM_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ANALYSIS"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ANALYSIS"  (
		  "ANALYSIS_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "NAME" VARCHAR(255) , 
		  "NOTES" VARCHAR(2000) , 
		  "VALIDATED" SMALLINT , 
		  "STUDY_ID" BIGINT , 
		  "ANALYSIS_ORDER" INTEGER )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."ANALYSIS"

ALTER TABLE "JRUAN   "."ANALYSIS" 
	ADD PRIMARY KEY
		("ANALYSIS_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ANALYSISSTEP"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ANALYSISSTEP"  (
		  "ANALYSISSTEP_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "COMMANDS" VARCHAR(2000) , 
		  "NAME" VARCHAR(255) , 
		  "NOTES" VARCHAR(2000) , 
		  "ALGORITHM_ID" BIGINT , 
		  "ANALYSIS_ID" BIGINT , 
		  "SOFTWARE_ID" BIGINT , 
		  "STEP_ORDER" INTEGER , 
		  "TB_ANALYSISID" VARCHAR(34) )   
		 IN "REGTBL16KTS" ; 

-- DDL Statements for primary key on Table "JRUAN   "."ANALYSISSTEP"

ALTER TABLE "JRUAN   "."ANALYSISSTEP" 
	ADD PRIMARY KEY
		("ANALYSISSTEP_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ANALYZEDDATA"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ANALYZEDDATA"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "ANALYZEDDATA_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "INPUT" SMALLINT , 
		  "NOTES" VARCHAR(2000) , 
		  "TREELENGTH" INTEGER , 
		  "ANALYSISSTEP_ID" BIGINT NOT NULL , 
		  "MATRIX_ID" BIGINT , 
		  "PHYLOTREE_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."ANALYZEDDATA"

ALTER TABLE "JRUAN   "."ANALYZEDDATA" 
	ADD PRIMARY KEY
		("ANALYZEDDATA_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ANCESTRALSTATE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ANCESTRALSTATE"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "ANCESTRALSTATE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "ANCVALUE" VARCHAR(255) , 
		  "DISCRETECHARSTATE_ID" BIGINT , 
		  "ANCSTATESET_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."ANCESTRALSTATE"

ALTER TABLE "JRUAN   "."ANCESTRALSTATE" 
	ADD PRIMARY KEY
		("ANCESTRALSTATE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ANCSTATESET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ANCSTATESET"  (
		  "ANCSTATESET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIX_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."ANCSTATESET"

ALTER TABLE "JRUAN   "."ANCSTATESET" 
	ADD PRIMARY KEY
		("ANCSTATESET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CHARGROUP"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CHARGROUP"  (
		  "CHARGROUP_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "CHARPARTITION_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CHARGROUP"

ALTER TABLE "JRUAN   "."CHARGROUP" 
	ADD PRIMARY KEY
		("CHARGROUP_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CHARPARTITION"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CHARPARTITION"  (
		  "CHARPARTITION_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIX_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CHARPARTITION"

ALTER TABLE "JRUAN   "."CHARPARTITION" 
	ADD PRIMARY KEY
		("CHARPARTITION_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CHARSET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CHARSET"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "CHARSET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIX_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CHARSET"

ALTER TABLE "JRUAN   "."CHARSET" 
	ADD PRIMARY KEY
		("CHARSET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CHARWEIGHT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CHARWEIGHT"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "CHARWEIGHT_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "WEIGHT" INTEGER , 
		  "REALWEIGHT" DOUBLE , 
		  "CHARWEIGHTSET_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CHARWEIGHT"

ALTER TABLE "JRUAN   "."CHARWEIGHT" 
	ADD PRIMARY KEY
		("CHARWEIGHT_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CHARWEIGHTSET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CHARWEIGHTSET"  (
		  "CHARWEIGHTSET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIX_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CHARWEIGHTSET"

ALTER TABLE "JRUAN   "."CHARWEIGHTSET" 
	ADD PRIMARY KEY
		("CHARWEIGHTSET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CITATION"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CITATION"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "CITATION_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "PMID" VARCHAR(255) , 
		  "URL" VARCHAR(255) , 
		  "ABSTRACT" VARCHAR(10000) , 
		  "DOI" VARCHAR(255) , 
		  "KEYWORDS" VARCHAR(255) , 
		  "PAGES" VARCHAR(255) , 
		  "PUBLISHYEAR" INTEGER , 
		  "PUBLISHED" SMALLINT , 
		  "TITLE" VARCHAR(500) , 
		  "ISSUE" VARCHAR(255) , 
		  "JOURNAL" VARCHAR(255) , 
		  "VOLUME" VARCHAR(255) , 
		  "ISBN" VARCHAR(255) , 
		  "BOOKTITLE" VARCHAR(255) , 
		  "CITY" VARCHAR(255) , 
		  "PUBLISHER" VARCHAR(255) , 
		  "CITATIONSTATUS_ID" BIGINT , 
		  "TB_STUDYID" VARCHAR(30) )   
		 IN "REGTBL16KTS" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CITATION"

ALTER TABLE "JRUAN   "."CITATION" 
	ADD PRIMARY KEY
		("CITATION_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CITATIONSTATUS"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CITATIONSTATUS"  (
		  "CITATIONSTATUS_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(50) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CITATIONSTATUS"

ALTER TABLE "JRUAN   "."CITATIONSTATUS" 
	ADD PRIMARY KEY
		("CITATIONSTATUS_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CITATION_AUTHOR"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CITATION_AUTHOR"  (
		  "CITATION_ID" BIGINT NOT NULL , 
		  "AUTHORS_PERSON_ID" BIGINT NOT NULL , 
		  "AUTHOR_ORDER" INTEGER NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CITATION_AUTHOR"

ALTER TABLE "JRUAN   "."CITATION_AUTHOR" 
	ADD PRIMARY KEY
		("CITATION_ID",
		 "AUTHOR_ORDER");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CITATION_EDITOR"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CITATION_EDITOR"  (
		  "CITATION_ID" BIGINT NOT NULL , 
		  "EDITORS_PERSON_ID" BIGINT NOT NULL , 
		  "EDITOR_ORDER" INTEGER NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CITATION_EDITOR"

ALTER TABLE "JRUAN   "."CITATION_EDITOR" 
	ADD PRIMARY KEY
		("CITATION_ID",
		 "EDITOR_ORDER");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."COLUMNRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."COLUMNRANGE"  (
		  "COLUMNRANGE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "ENDCOLINDEX" INTEGER , 
		  "REPEATINTERVAL" INTEGER , 
		  "STARTCOLINDEX" INTEGER )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."COLUMNRANGE"

ALTER TABLE "JRUAN   "."COLUMNRANGE" 
	ADD PRIMARY KEY
		("COLUMNRANGE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."COMPOUND_ELEMENT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."COMPOUND_ELEMENT"  (
		  "COMPOUND_ID" BIGINT NOT NULL , 
		  "ELEMENT_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."COMPOUND_ELEMENT"

ALTER TABLE "JRUAN   "."COMPOUND_ELEMENT" 
	ADD PRIMARY KEY
		("COMPOUND_ID",
		 "ELEMENT_ID");


-- DDL Statements for unique constraints on Table "JRUAN   "."COMPOUND_ELEMENT"

ALTER TABLE "JRUAN   "."COMPOUND_ELEMENT" 
	ADD UNIQUE
		("ELEMENT_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CONTANCSTATE_VALUE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CONTANCSTATE_VALUE"  (
		  "ANCSTATE_ID" BIGINT NOT NULL , 
		  "ELEMENT" VARCHAR(255) )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CSTREENODE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CSTREENODE"  (
		  "CSTREENODE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DISCRETECHARSTATE_ID" BIGINT , 
		  "PARENTNODE_ID" BIGINT , 
		  "CSTREE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CSTREENODE"

ALTER TABLE "JRUAN   "."CSTREENODE" 
	ADD PRIMARY KEY
		("CSTREENODE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."CHARGROUP_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CHARGROUP_COLRANGE"  (
		  "CHARGROUP_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."CHARGROUP_COLRANGE"

ALTER TABLE "JRUAN   "."CHARGROUP_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CHARSET_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CHARSET_COLRANGE"  (
		  "CHARSET_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."CHARSET_COLRANGE"

ALTER TABLE "JRUAN   "."CHARSET_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CHARWEIGHT_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CHARWEIGHT_COLRANGE"  (
		  "CHARWEIGHT_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."CHARWEIGHT_COLRANGE"

ALTER TABLE "JRUAN   "."CHARWEIGHT_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CODERECORD_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CODERECORD_COLRANGE"  (
		  "GENETICCODERECORD_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."CODERECORD_COLRANGE"

ALTER TABLE "JRUAN   "."CODERECORD_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CODONCHAR1_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CODONCHAR1_COLRANGE"  (
		  "CODONPOSITIONSET_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."CODONCHAR1_COLRANGE"

ALTER TABLE "JRUAN   "."CODONCHAR1_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CODONCHAR2_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CODONCHAR2_COLRANGE"  (
		  "CODONPOSITIONSET_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."CODONCHAR2_COLRANGE"

ALTER TABLE "JRUAN   "."CODONCHAR2_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CODONCHAR3_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CODONCHAR3_COLRANGE"  (
		  "CODONPOSITIONSET_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."CODONCHAR3_COLRANGE"

ALTER TABLE "JRUAN   "."CODONCHAR3_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CODONNONCODING_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CODONNONCODING_COLRANGE"  (
		  "CODONPOSITIONSET_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."CODONNONCODING_COLRANGE"

ALTER TABLE "JRUAN   "."CODONNONCODING_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."CODONPOSITIONSET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."CODONPOSITIONSET"  (
		  "CODONPOSITIONSET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIX_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."CODONPOSITIONSET"

ALTER TABLE "JRUAN   "."CODONPOSITIONSET" 
	ADD PRIMARY KEY
		("CODONPOSITIONSET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."DISCRETECHARSTATE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."DISCRETECHARSTATE"  (
		  "DISCRETECHARSTATE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) , 
		  "NOTES" VARCHAR(255) , 
		  "SYMBOL" CHAR(1) , 
		  "PHYLOCHAR_ID" BIGINT NOT NULL , 
		  "STATESET_ID" BIGINT , 
		  "ANCESTRALSTATE_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."DISCRETECHARSTATE"

ALTER TABLE "JRUAN   "."DISCRETECHARSTATE" 
	ADD PRIMARY KEY
		("DISCRETECHARSTATE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."DISTANCEMATRIXELEMENT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."DISTANCEMATRIXELEMENT"  (
		  "DISTANCEMATRIXELEMENT_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DISTANCE" DOUBLE , 
		  "COLUMNLABEL_ID" BIGINT , 
		  "MATRIX_ID" BIGINT NOT NULL , 
		  "ROWLABEL_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."DISTANCEMATRIXELEMENT"

ALTER TABLE "JRUAN   "."DISTANCEMATRIXELEMENT" 
	ADD PRIMARY KEY
		("DISTANCEMATRIXELEMENT_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."GAPMODE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."GAPMODE"  (
		  "GAPMODE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."GAPMODE"

ALTER TABLE "JRUAN   "."GAPMODE" 
	ADD PRIMARY KEY
		("GAPMODE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."GENETICCODESET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."GENETICCODESET"  (
		  "GENETICCODESET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "FORMAT" VARCHAR(255) , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIX_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."GENETICCODESET"

ALTER TABLE "JRUAN   "."GENETICCODESET" 
	ADD PRIMARY KEY
		("GENETICCODESET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."GENETICCODE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."GENETICCODE"  (
		  "GENETICCODE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "CODEDESCRIPTION" VARCHAR(1000) , 
		  "CODEORDER" VARCHAR(255) , 
		  "EXTENSIONS" VARCHAR(255) , 
		  "NUCORDER" VARCHAR(255) , 
		  "PREDEFINED" SMALLINT , 
		  "TITLE" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."GENETICCODE"

ALTER TABLE "JRUAN   "."GENETICCODE" 
	ADD PRIMARY KEY
		("GENETICCODE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."GENETICCODERECORD"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."GENETICCODERECORD"  (
		  "GENETICCODERECORD_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "GENETICCODE_ID" BIGINT , 
		  "GENETICCODESET_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."GENETICCODERECORD"

ALTER TABLE "JRUAN   "."GENETICCODERECORD" 
	ADD PRIMARY KEY
		("GENETICCODERECORD_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."HELP"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."HELP"  (
		  "HELP_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "HELPTEXT" CLOB(65536) LOGGED NOT COMPACT , 
		  "TAG" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."HELP"

ALTER TABLE "JRUAN   "."HELP" 
	ADD PRIMARY KEY
		("HELP_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ITEMDEFINITION"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ITEMDEFINITION"  (
		  "ITEMDEFINITION_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."ITEMDEFINITION"

ALTER TABLE "JRUAN   "."ITEMDEFINITION" 
	ADD PRIMARY KEY
		("ITEMDEFINITION_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ITEMVALUE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ITEMVALUE"  (
		  "ITEMVALUE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "VALUE" VARCHAR(255) , 
		  "ELEMENT_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."ITEMVALUE"

ALTER TABLE "JRUAN   "."ITEMVALUE" 
	ADD PRIMARY KEY
		("ITEMVALUE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."LEFTCHANGESET_CHARSTATE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."LEFTCHANGESET_CHARSTATE"  (
		  "STATECHANGESET_ID" BIGINT NOT NULL , 
		  "DISCRETECHARSTATE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."MATRIX"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."MATRIX"  (
		  "MATRIXTYPE" CHAR(1) NOT NULL , 
		  "MATRIX_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TB_MATRIXID" VARCHAR(30) , 
		  "DESCRIPTION" VARCHAR(2000) , 
		  "GAPSYMBOL" CHAR(1) , 
		  "MISSINGSYMBOL" CHAR(1) , 
		  "NEXUSFILENAME" VARCHAR(255) , 
		  "PUBLISHED" SMALLINT , 
		  "SYMBOLS" VARCHAR(255) , 
		  "TITLE" VARCHAR(255) , 
		  "NCHAR" INTEGER , 
		  "NTAX" INTEGER , 
		  "ALIGNED" SMALLINT , 
		  "DIAGONAL" SMALLINT , 
		  "TRIANGLE" VARCHAR(255) , 
		  "CASESENSITIVE" SMALLINT , 
		  "MATRIXDATATYPE_ID" BIGINT , 
		  "MATRIXKIND_ID" BIGINT , 
		  "STUDY_ID" BIGINT , 
		  "TAXONLABELSET_ID" BIGINT , 
		  "ANCSTATESET_ID" BIGINT , 
		  "CODONPOSITIONSET_ID" BIGINT , 
		  "CHARSET_ID" BIGINT , 
		  "TYPESET_ID" BIGINT , 
		  "CHARWEIGHTSET_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."MATRIX"

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD PRIMARY KEY
		("MATRIX_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."MATRIXCOLUMN"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."MATRIXCOLUMN"  (
		  "MATRIXCOLUMN_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "PHYLOCHAR_ID" BIGINT , 
		  "MATRIX_ID" BIGINT , 
		  "STATEFORMAT_ID" BIGINT , 
		  "COLUMN_ORDER" INTEGER )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."MATRIXCOLUMN"

CREATE INDEX "JRUAN   "."COLUMN_M_IDX" ON "JRUAN   "."MATRIXCOLUMN" 
		("MATRIX_ID" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."MATRIXCOLUMN"

ALTER TABLE "JRUAN   "."MATRIXCOLUMN" 
	ADD PRIMARY KEY
		("MATRIXCOLUMN_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."MATRIXCOLUMN_ITEMDEFINITION"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."MATRIXCOLUMN_ITEMDEFINITION"  (
		  "MATRIXCOLUMN_ID" BIGINT NOT NULL , 
		  "ITEMDEFINITION_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."MATRIXCOLUMN_ITEMDEFINITION"

ALTER TABLE "JRUAN   "."MATRIXCOLUMN_ITEMDEFINITION" 
	ADD PRIMARY KEY
		("MATRIXCOLUMN_ID",
		 "ITEMDEFINITION_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."MATRIXDATATYPE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."MATRIXDATATYPE"  (
		  "MATRIXDATATYPE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) , 
		  "PHYLOCHAR_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."MATRIXDATATYPE"

ALTER TABLE "JRUAN   "."MATRIXDATATYPE" 
	ADD PRIMARY KEY
		("MATRIXDATATYPE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."MATRIXELEMENT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."MATRIXELEMENT"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "MATRIXELEMENT_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "ANDLOGIC" SMALLINT , 
		  "COMPOUNDVALUE" VARCHAR(1000) , 
		  "VALUE" DOUBLE , 
		  "GAP" SMALLINT , 
		  "MATRIXCOLUMN_ID" BIGINT , 
		  "MATRIXROW_ID" BIGINT , 
		  "ITEMDEFINITION_ID" BIGINT , 
		  "DISCRETECHARSTATE_ID" BIGINT , 
		  "ELEMENT_ORDER" INTEGER )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."MATRIXELEMENT"

CREATE INDEX "JRUAN   "."ELEMENT_COL_IDX" ON "JRUAN   "."MATRIXELEMENT" 
		("MATRIXCOLUMN_ID" ASC);

-- DDL Statements for indexes on Table "JRUAN   "."MATRIXELEMENT"

CREATE INDEX "JRUAN   "."ELEMENT_ROW_IDX" ON "JRUAN   "."MATRIXELEMENT" 
		("MATRIXROW_ID" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."MATRIXELEMENT"

ALTER TABLE "JRUAN   "."MATRIXELEMENT" 
	ADD PRIMARY KEY
		("MATRIXELEMENT_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."MATRIXKIND"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."MATRIXKIND"  (
		  "MATRIXKIND_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(100) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."MATRIXKIND"

ALTER TABLE "JRUAN   "."MATRIXKIND" 
	ADD PRIMARY KEY
		("MATRIXKIND_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."MATRIXROW"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."MATRIXROW"  (
		  "MATRIXROW_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "SYMBOLSTRING" CLOB(524288) LOGGED NOT COMPACT , 
		  "MATRIX_ID" BIGINT , 
		  "TAXONLABEL_ID" BIGINT NOT NULL , 
		  "ROW_ORDER" INTEGER )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."MATRIXROW"

CREATE INDEX "JRUAN   "."ROW_M_IDX" ON "JRUAN   "."MATRIXROW" 
		("MATRIX_ID" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."MATRIXROW"

ALTER TABLE "JRUAN   "."MATRIXROW" 
	ADD PRIMARY KEY
		("MATRIXROW_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."MATRIX_ITEMDEFINITION"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."MATRIX_ITEMDEFINITION"  (
		  "MATRIX_ID" BIGINT NOT NULL , 
		  "ITEMDEFINITION_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."MATRIX_ITEMDEFINITION"

ALTER TABLE "JRUAN   "."MATRIX_ITEMDEFINITION" 
	ADD PRIMARY KEY
		("MATRIX_ID",
		 "ITEMDEFINITION_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."NODEATTRIBUTE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."NODEATTRIBUTE"  (
		  "NODEATTRIBUTE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."NODEATTRIBUTE"

ALTER TABLE "JRUAN   "."NODEATTRIBUTE" 
	ADD PRIMARY KEY
		("NODEATTRIBUTE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."PERSON"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."PERSON"  (
		  "PERSON_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "EMAIL" VARCHAR(255) , 
		  "FIRSTNAME" VARCHAR(255) , 
		  "LASTNAME" VARCHAR(255) NOT NULL , 
		  "MNAME" VARCHAR(255) , 
		  "PHONE" VARCHAR(50) , 
		  "AUTHORID" VARCHAR(50) )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."PERSON"

CREATE INDEX "JRUAN   "."PERSON_EMAIL_IDX" ON "JRUAN   "."PERSON" 
		("EMAIL" ASC);

-- DDL Statements for indexes on Table "JRUAN   "."PERSON"

CREATE INDEX "JRUAN   "."PERSON_LNAME_IDX" ON "JRUAN   "."PERSON" 
		("LASTNAME" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."PERSON"

ALTER TABLE "JRUAN   "."PERSON" 
	ADD PRIMARY KEY
		("PERSON_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."PHYLOCHAR"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."PHYLOCHAR"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "PHYLOCHAR_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) , 
		  "LOWERLIMIT" DOUBLE , 
		  "UPPERLIMIT" DOUBLE )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."PHYLOCHAR"

ALTER TABLE "JRUAN   "."PHYLOCHAR" 
	ADD PRIMARY KEY
		("PHYLOCHAR_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."PHYLOTREE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."PHYLOTREE"  (
		  "PHYLOTREE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TB1_TREEID" VARCHAR(30) , 
		  "BIGTREE" SMALLINT , 
		  "LABEL" VARCHAR(255) , 
		  "NTAX" INTEGER , 
		  "NEWICKSTRING" CLOB(4194304) LOGGED NOT COMPACT , 
		  "NEXUSFILENAME" VARCHAR(255) , 
		  "PUBLISHED" SMALLINT , 
		  "ROOTEDTREE" SMALLINT , 
		  "TITLE" VARCHAR(255) , 
		  "ROOTNODE_ID" BIGINT , 
		  "STUDY_ID" BIGINT , 
		  "TREEATTRIBUTE_ID" BIGINT , 
		  "TREEBLOCK_ID" BIGINT , 
		  "TREEKIND_ID" BIGINT , 
		  "TREEQUALITY_ID" BIGINT , 
		  "TREETYPE_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."PHYLOTREE"

ALTER TABLE "JRUAN   "."PHYLOTREE" 
	ADD PRIMARY KEY
		("PHYLOTREE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."PHYLOTREENODE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."PHYLOTREENODE"  (
		  "PHYLOTREENODE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "BRANCHLENGTH" DOUBLE , 
		  "LEFTNODE" BIGINT , 
		  "NAME" VARCHAR(255) , 
		  "NODEDEPTH" INTEGER , 
		  "RIGHTNODE" BIGINT , 
		  "CHILD_ID" BIGINT , 
		  "NODEATTRIBUTE_ID" BIGINT , 
		  "PARENT_ID" BIGINT , 
		  "SIBLING_ID" BIGINT , 
		  "TAXONLABEL_ID" BIGINT , 
		  "PHYLOTREE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."PHYLOTREENODE"

CREATE INDEX "JRUAN   "."TNODE_TAXLABEL_IDX" ON "JRUAN   "."PHYLOTREENODE" 
		("TAXONLABEL_ID" ASC);

-- DDL Statements for indexes on Table "JRUAN   "."PHYLOTREENODE"

CREATE INDEX "JRUAN   "."TNODE_TREE_IDX" ON "JRUAN   "."PHYLOTREENODE" 
		("PHYLOTREE_ID" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."PHYLOTREENODE"

ALTER TABLE "JRUAN   "."PHYLOTREENODE" 
	ADD PRIMARY KEY
		("PHYLOTREENODE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."POLYTCOUNT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."POLYTCOUNT"  (
		  "POLYTCOUNT_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."POLYTCOUNT"

ALTER TABLE "JRUAN   "."POLYTCOUNT" 
	ADD PRIMARY KEY
		("POLYTCOUNT_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."RIGHTCHANGESET_CHARSTATE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."RIGHTCHANGESET_CHARSTATE"  (
		  "STATECHANGESET_ID" BIGINT NOT NULL , 
		  "DISCRETECHARSTATE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."ROWSEGMENT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."ROWSEGMENT"  (
		  "ROWSEGMENT_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "ENDINDEX" INTEGER , 
		  "CATALOGNUM" VARCHAR(50) , 
		  "COLLECTIONCODE" VARCHAR(50) , 
		  "COLLECTOR" VARCHAR(255) , 
		  "COUNTRY" VARCHAR(50) , 
		  "ELEVATION" DOUBLE , 
		  "GENBACCESSION" VARCHAR(30) , 
		  "INSTACRONYM" VARCHAR(50) , 
		  "LATITUDE" DOUBLE , 
		  "LOCALITY" VARCHAR(255) , 
		  "LONGITUDE" DOUBLE , 
		  "NOTES" VARCHAR(2000) , 
		  "OTHERACCESSION" VARCHAR(50) , 
		  "SAMPLEDATE" DATE , 
		  "STATE" VARCHAR(50) , 
		  "STARTINDEX" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIXROW_ID" BIGINT NOT NULL , 
		  "TAXONLABEL_ID" BIGINT )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."ROWSEGMENT"

CREATE INDEX "JRUAN   "."SPECIM_INST_IDX" ON "JRUAN   "."ROWSEGMENT" 
		("INSTACRONYM" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."ROWSEGMENT"

ALTER TABLE "JRUAN   "."ROWSEGMENT" 
	ADD PRIMARY KEY
		("ROWSEGMENT_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."SOFTWARE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."SOFTWARE"  (
		  "SOFTWARE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(2000) , 
		  "NAME" VARCHAR(255) , 
		  "SOFTWAREURL" VARCHAR(500) , 
		  "SOFTWAREVERSION" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."SOFTWARE"

ALTER TABLE "JRUAN   "."SOFTWARE" 
	ADD PRIMARY KEY
		("SOFTWARE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."STATECHANGESET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."STATECHANGESET"  (
		  "STATECHANGESET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "REVERSIBLE" SMALLINT , 
		  "TITLE" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."STATECHANGESET"

ALTER TABLE "JRUAN   "."STATECHANGESET" 
	ADD PRIMARY KEY
		("STATECHANGESET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."STATEFORMAT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."STATEFORMAT"  (
		  "STATEFORMAT_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."STATEFORMAT"

ALTER TABLE "JRUAN   "."STATEFORMAT" 
	ADD PRIMARY KEY
		("STATEFORMAT_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."STATEMODIFIER"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."STATEMODIFIER"  (
		  "STATEMODIFIER_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "COUNT" INTEGER , 
		  "FREQUENCY" DOUBLE , 
		  "DISCRETECHARSTATE_ID" BIGINT , 
		  "ELEMENT_ID" BIGINT NOT NULL , 
		  "STATEFORMAT_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."STATEMODIFIER"

ALTER TABLE "JRUAN   "."STATEMODIFIER" 
	ADD PRIMARY KEY
		("STATEMODIFIER_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."STATESET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."STATESET"  (
		  "STATESET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIX_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."STATESET"

ALTER TABLE "JRUAN   "."STATESET" 
	ADD PRIMARY KEY
		("STATESET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."STEPMATRIXELEMENT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."STEPMATRIXELEMENT"  (
		  "DISCRETECHARSTATE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TRANSCOST" DOUBLE , 
		  "STATE1_ID" BIGINT , 
		  "STATE2_ID" BIGINT , 
		  "STEPMATRIX_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."STEPMATRIXELEMENT"

ALTER TABLE "JRUAN   "."STEPMATRIXELEMENT" 
	ADD PRIMARY KEY
		("DISCRETECHARSTATE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."STUDY"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."STUDY"  (
		  "STUDY_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TB_STUDYID" VARCHAR(30) , 
		  "ACCESSIONNUMBER" VARCHAR(255) , 
		  "LASTMODIFIEDDATE" DATE , 
		  "NAME" VARCHAR(255) , 
		  "NOTES" VARCHAR(2000) , 
		  "RELEASEDATE" DATE , 
		  "CITATION_ID" BIGINT , 
		  "USER_ID" BIGINT , 
		  "STUDYSTATUS_ID" BIGINT )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."STUDY"

CREATE INDEX "JRUAN   "."STUDY_NAME_IDX" ON "JRUAN   "."STUDY" 
		("NAME" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."STUDY"

ALTER TABLE "JRUAN   "."STUDY" 
	ADD PRIMARY KEY
		("STUDY_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."STUDYSTATUS"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."STUDYSTATUS"  (
		  "STUDYSTATUS_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."STUDYSTATUS"

ALTER TABLE "JRUAN   "."STUDYSTATUS" 
	ADD PRIMARY KEY
		("STUDYSTATUS_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."SUBMISSION"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."SUBMISSION"  (
		  "SUBMISSION_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "CREATEDATE" DATE , 
		  "SUBMISSIONNUMBER" VARCHAR(255) , 
		  "TEST" SMALLINT NOT NULL , 
		  "STUDY_ID" BIGINT NOT NULL , 
		  "USER_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."SUBMISSION"

ALTER TABLE "JRUAN   "."SUBMISSION" 
	ADD PRIMARY KEY
		("SUBMISSION_ID");


-- DDL Statements for unique constraints on Table "JRUAN   "."SUBMISSION"

ALTER TABLE "JRUAN   "."SUBMISSION" 
	ADD UNIQUE
		("STUDY_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."SUB_MATRIX"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."SUB_MATRIX"  (
		  "SUBMISSION_ID" BIGINT NOT NULL , 
		  "MATRIX_ID" BIGINT NOT NULL , 
		  "COLLECTION_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."SUB_MATRIX"

ALTER TABLE "JRUAN   "."SUB_MATRIX" 
	ADD PRIMARY KEY
		("COLLECTION_ID");


-- DDL Statements for unique constraints on Table "JRUAN   "."SUB_MATRIX"

ALTER TABLE "JRUAN   "."SUB_MATRIX" 
	ADD UNIQUE
		("MATRIX_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."SUB_TAXONLABEL"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."SUB_TAXONLABEL"  (
		  "SUBMISSION_ID" BIGINT NOT NULL , 
		  "TAXONLABEL_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."SUB_TAXONLABEL"

ALTER TABLE "JRUAN   "."SUB_TAXONLABEL" 
	ADD PRIMARY KEY
		("SUBMISSION_ID",
		 "TAXONLABEL_ID");


-- DDL Statements for unique constraints on Table "JRUAN   "."SUB_TAXONLABEL"

ALTER TABLE "JRUAN   "."SUB_TAXONLABEL" 
	ADD UNIQUE
		("TAXONLABEL_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."SUB_TREEBLOCK"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."SUB_TREEBLOCK"  (
		  "SUBMISSION_ID" BIGINT NOT NULL , 
		  "TREEBLOCK_ID" BIGINT NOT NULL , 
		  "COLLECTION_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."SUB_TREEBLOCK"

ALTER TABLE "JRUAN   "."SUB_TREEBLOCK" 
	ADD PRIMARY KEY
		("COLLECTION_ID");


-- DDL Statements for unique constraints on Table "JRUAN   "."SUB_TREEBLOCK"

ALTER TABLE "JRUAN   "."SUB_TREEBLOCK" 
	ADD UNIQUE
		("TREEBLOCK_ID");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."STUDY_NEXUSFILE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."STUDY_NEXUSFILE"  (
		  "STUDY_ID" BIGINT NOT NULL , 
		  "NEXUS" CLOB(4194304) LOGGED NOT COMPACT NOT NULL , 
		  "FILENAME" VARCHAR(255) NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."STUDY_NEXUSFILE"

ALTER TABLE "JRUAN   "."STUDY_NEXUSFILE" 
	ADD PRIMARY KEY
		("STUDY_ID",
		 "FILENAME");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXON"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXON"  (
		  "TAXON_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "UBIONAMEBANKID" BIGINT , 
		  "DESCRIPTION" VARCHAR(2000) , 
		  "GROUPCODE" INTEGER , 
		  "NAME" VARCHAR(255) , 
		  "NCBITAXID" INTEGER , 
		  "TB1LEGACYID" INTEGER )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."TAXON"

CREATE INDEX "JRUAN   "."TAXON_NAME_IDX" ON "JRUAN   "."TAXON" 
		("NAME" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."TAXON"

ALTER TABLE "JRUAN   "."TAXON" 
	ADD PRIMARY KEY
		("TAXON_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONAUTHORITY"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONAUTHORITY"  (
		  "TAXONAUTHORITY_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "CONNECTIONSTR" VARCHAR(1000) , 
		  "DESCRIPTION" VARCHAR(2000) , 
		  "NAME" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TAXONAUTHORITY"

ALTER TABLE "JRUAN   "."TAXONAUTHORITY" 
	ADD PRIMARY KEY
		("TAXONAUTHORITY_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONLABEL"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONLABEL"  (
		  "TAXONLABEL_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "LINKED" SMALLINT , 
		  "TAXONLABEL" VARCHAR(255) , 
		  "STUDY_ID" BIGINT , 
		  "TAXONVARIANT_ID" BIGINT )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."TAXONLABEL"

CREATE INDEX "JRUAN   "."TLABEL_STUDY_IDX" ON "JRUAN   "."TAXONLABEL" 
		("STUDY_ID" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."TAXONLABEL"

ALTER TABLE "JRUAN   "."TAXONLABEL" 
	ADD PRIMARY KEY
		("TAXONLABEL_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONLABELGROUP"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONLABELGROUP"  (
		  "TAXONLABELGROUP_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "TAXONLABELPARTITION_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TAXONLABELGROUP"

ALTER TABLE "JRUAN   "."TAXONLABELGROUP" 
	ADD PRIMARY KEY
		("TAXONLABELGROUP_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONLABELPARTITION"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONLABELPARTITION"  (
		  "TAXONLABELPARTITION_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TAXONLABELPARTITION"

ALTER TABLE "JRUAN   "."TAXONLABELPARTITION" 
	ADD PRIMARY KEY
		("TAXONLABELPARTITION_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONLABELROUP_TAXONLABEL"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONLABELROUP_TAXONLABEL"  (
		  "TAXONLABELGROUP_ID" BIGINT NOT NULL , 
		  "TAXONLABEL_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONLINK"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONLINK"  (
		  "LINKTYPE" CHAR(1) NOT NULL , 
		  "TAXONLINK_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "FOREIGNTAXONID" VARCHAR(255) , 
		  "TAXONAUTHORITY_ID" BIGINT NOT NULL , 
		  "TAXON_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TAXONLINK"

ALTER TABLE "JRUAN   "."TAXONLINK" 
	ADD PRIMARY KEY
		("TAXONLINK_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONSET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONSET"  (
		  "TAXONSET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TAXONSET"

ALTER TABLE "JRUAN   "."TAXONSET" 
	ADD PRIMARY KEY
		("TAXONSET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONSET_TAXON"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONSET_TAXON"  (
		  "TAXONSET_ID" BIGINT NOT NULL , 
		  "TAXON_ID" BIGINT NOT NULL , 
		  "TAXON_ORDER" INTEGER NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TAXONSET_TAXON"

ALTER TABLE "JRUAN   "."TAXONSET_TAXON" 
	ADD PRIMARY KEY
		("TAXONSET_ID",
		 "TAXON_ORDER");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONVARIANT"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONVARIANT"  (
		  "TAXONVARIANT_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "FULLNAME" VARCHAR(255) , 
		  "LEXICALQUALIFIER" VARCHAR(50) , 
		  "NAME" VARCHAR(255) , 
		  "NAMEBANKID" BIGINT , 
		  "TAXON_ID" BIGINT NOT NULL , 
		  "TB1LEGACYID" INTEGER )   
		 IN "USERSPACE1" ; 
-- DDL Statements for indexes on Table "JRUAN   "."TAXONVARIANT"

CREATE INDEX "JRUAN   "."TVARI_FNAME_IDX" ON "JRUAN   "."TAXONVARIANT" 
		("FULLNAME" ASC);

-- DDL Statements for indexes on Table "JRUAN   "."TAXONVARIANT"

CREATE INDEX "JRUAN   "."TVARI_NBID_IDX" ON "JRUAN   "."TAXONVARIANT" 
		("NAMEBANKID" ASC);

-- DDL Statements for indexes on Table "JRUAN   "."TAXONVARIANT"

CREATE INDEX "JRUAN   "."TVARI_TAXON_IDX" ON "JRUAN   "."TAXONVARIANT" 
		("TAXON_ID" ASC);


-- DDL Statements for primary key on Table "JRUAN   "."TAXONVARIANT"

ALTER TABLE "JRUAN   "."TAXONVARIANT" 
	ADD PRIMARY KEY
		("TAXONVARIANT_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREEATTRIBUTE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREEATTRIBUTE"  (
		  "TREEATTRIBUTE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREEATTRIBUTE"

ALTER TABLE "JRUAN   "."TREEATTRIBUTE" 
	ADD PRIMARY KEY
		("TREEATTRIBUTE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREEBLOCK"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREEBLOCK"  (
		  "TREEBLOCK_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "TAXONLABELSET_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREEBLOCK"

ALTER TABLE "JRUAN   "."TREEBLOCK" 
	ADD PRIMARY KEY
		("TREEBLOCK_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREEGROUP"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREEGROUP"  (
		  "TREEGROUP_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "TREEPARTITION_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREEGROUP"

ALTER TABLE "JRUAN   "."TREEGROUP" 
	ADD PRIMARY KEY
		("TREEGROUP_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREEGROUP_PHYLOTREE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREEGROUP_PHYLOTREE"  (
		  "TREEGROUP_ID" BIGINT NOT NULL , 
		  "PHYLOTREE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREEGROUP_PHYLOTREE"

ALTER TABLE "JRUAN   "."TREEGROUP_PHYLOTREE" 
	ADD PRIMARY KEY
		("TREEGROUP_ID",
		 "PHYLOTREE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREEKIND"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREEKIND"  (
		  "TREEKIND_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(100) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREEKIND"

ALTER TABLE "JRUAN   "."TREEKIND" 
	ADD PRIMARY KEY
		("TREEKIND_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREENODEEDGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREENODEEDGE"  (
		  "TREENODEEDGE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "CHILDNODE_ID" BIGINT NOT NULL , 
		  "PARENTNODE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREENODEEDGE"

ALTER TABLE "JRUAN   "."TREENODEEDGE" 
	ADD PRIMARY KEY
		("TREENODEEDGE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREEPARTITION"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREEPARTITION"  (
		  "TREEPARTITION_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREEPARTITION"

ALTER TABLE "JRUAN   "."TREEPARTITION" 
	ADD PRIMARY KEY
		("TREEPARTITION_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREEQUALITY"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREEQUALITY"  (
		  "TREEQUALITY_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREEQUALITY"

ALTER TABLE "JRUAN   "."TREEQUALITY" 
	ADD PRIMARY KEY
		("TREEQUALITY_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREESET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREESET"  (
		  "TREESET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREESET"

ALTER TABLE "JRUAN   "."TREESET" 
	ADD PRIMARY KEY
		("TREESET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREESET_PHYLOTREE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREESET_PHYLOTREE"  (
		  "TREESET_ID" BIGINT NOT NULL , 
		  "PHYLOTREE_ID" BIGINT NOT NULL , 
		  "TREE_ORDER" INTEGER NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREESET_PHYLOTREE"

ALTER TABLE "JRUAN   "."TREESET_PHYLOTREE" 
	ADD PRIMARY KEY
		("TREESET_ID",
		 "TREE_ORDER");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TREETYPE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TREETYPE"  (
		  "TREETYPE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "DESCRIPTION" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TREETYPE"

ALTER TABLE "JRUAN   "."TREETYPE" 
	ADD PRIMARY KEY
		("TREETYPE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TYPESET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TYPESET"  (
		  "TYPESET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) , 
		  "MATRIX_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TYPESET"

ALTER TABLE "JRUAN   "."TYPESET" 
	ADD PRIMARY KEY
		("TYPESET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONLABELSET"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONLABELSET"  (
		  "TAXONLABELSET_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TAXA" SMALLINT , 
		  "TITLE" VARCHAR(255) , 
		  "STUDY_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TAXONLABELSET"

ALTER TABLE "JRUAN   "."TAXONLABELSET" 
	ADD PRIMARY KEY
		("TAXONLABELSET_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."TAXONLABELSET_TAXONLABEL"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."TAXONLABELSET_TAXONLABEL"  (
		  "TAXONLABELSET_ID" BIGINT NOT NULL , 
		  "TAXONLABEL_ID" BIGINT NOT NULL , 
		  "TAXONLABEL_ORDER" INTEGER NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."TAXONLABELSET_TAXONLABEL"

ALTER TABLE "JRUAN   "."TAXONLABELSET_TAXONLABEL" 
	ADD PRIMARY KEY
		("TAXONLABELSET_ID",
		 "TAXONLABEL_ORDER");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."USER"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."USER"  (
		  "USER_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "PASSWORD" VARCHAR(100) NOT NULL , 
		  "USERNAME" VARCHAR(100) NOT NULL , 
		  "PERSON_ID" BIGINT NOT NULL , 
		  "USERROLE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."USER"

ALTER TABLE "JRUAN   "."USER" 
	ADD PRIMARY KEY
		("USER_ID");


-- DDL Statements for unique constraints on Table "JRUAN   "."USER"

ALTER TABLE "JRUAN   "."USER" 
	ADD UNIQUE
		("USERNAME");


------------------------------------------------
-- DDL Statements for table "JRUAN   "."USERROLE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."USERROLE"  (
		  "USERROLE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "AUTHORITY" VARCHAR(255) NOT NULL )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."USERROLE"

ALTER TABLE "JRUAN   "."USERROLE" 
	ADD PRIMARY KEY
		("USERROLE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."USERTYPE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."USERTYPE"  (
		  "TYPE" CHAR(1) NOT NULL , 
		  "USERTYPE_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "TITLE" VARCHAR(255) )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."USERTYPE"

ALTER TABLE "JRUAN   "."USERTYPE" 
	ADD PRIMARY KEY
		("USERTYPE_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."USERTYPERECORD"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."USERTYPERECORD"  (
		  "USERTYPERECORD_ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (  
		    START WITH +1  
		    INCREMENT BY +1  
		    MINVALUE +1  
		    MAXVALUE +9223372036854775807  
		    NO CYCLE  
		    CACHE 20  
		    NO ORDER ) , 
		  "VERSION" INTEGER , 
		  "USERTYPE_ID" BIGINT , 
		  "TYPESET_ID" BIGINT )   
		 IN "USERSPACE1" ; 

-- DDL Statements for primary key on Table "JRUAN   "."USERTYPERECORD"

ALTER TABLE "JRUAN   "."USERTYPERECORD" 
	ADD PRIMARY KEY
		("USERTYPERECORD_ID");



------------------------------------------------
-- DDL Statements for table "JRUAN   "."USERTYPERRD_COLRANGE"
------------------------------------------------
 
 CREATE TABLE "JRUAN   "."USERTYPERRD_COLRANGE"  (
		  "USERTYPERECORD_ID" BIGINT NOT NULL , 
		  "COLUMNRANGE_ID" BIGINT NOT NULL )   
		 IN "USERSPACE1" ; 


-- DDL Statements for unique constraints on Table "JRUAN   "."USERTYPERRD_COLRANGE"

ALTER TABLE "JRUAN   "."USERTYPERRD_COLRANGE" 
	ADD UNIQUE
		("COLUMNRANGE_ID");







-- DDL Statements for foreign keys on Table "JRUAN   "."EXPLAIN_STATEMENT"

ALTER TABLE "JRUAN   "."EXPLAIN_STATEMENT" 
	ADD CONSTRAINT "SQL050919121810950" FOREIGN KEY
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION")
	REFERENCES "JRUAN   "."EXPLAIN_INSTANCE"
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION")
	ON DELETE CASCADE
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."EXPLAIN_OPERATOR"

ALTER TABLE "JRUAN   "."EXPLAIN_OPERATOR" 
	ADD CONSTRAINT "SQL050919121810970" FOREIGN KEY
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	REFERENCES "JRUAN   "."EXPLAIN_STATEMENT"
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	ON DELETE CASCADE
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."EXPLAIN_OBJECT"

ALTER TABLE "JRUAN   "."EXPLAIN_OBJECT" 
	ADD CONSTRAINT "SQL050919121811000" FOREIGN KEY
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	REFERENCES "JRUAN   "."EXPLAIN_STATEMENT"
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	ON DELETE CASCADE
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."EXPLAIN_PREDICATE"

ALTER TABLE "JRUAN   "."EXPLAIN_PREDICATE" 
	ADD CONSTRAINT "SQL050919121811040" FOREIGN KEY
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	REFERENCES "JRUAN   "."EXPLAIN_STATEMENT"
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	ON DELETE CASCADE
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."EXPLAIN_ARGUMENT"

ALTER TABLE "JRUAN   "."EXPLAIN_ARGUMENT" 
	ADD CONSTRAINT "SQL050919121811060" FOREIGN KEY
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	REFERENCES "JRUAN   "."EXPLAIN_STATEMENT"
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	ON DELETE CASCADE
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."EXPLAIN_STREAM"

ALTER TABLE "JRUAN   "."EXPLAIN_STREAM" 
	ADD CONSTRAINT "SQL050919121811070" FOREIGN KEY
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	REFERENCES "JRUAN   "."EXPLAIN_STATEMENT"
		("EXPLAIN_REQUESTER",
		 "EXPLAIN_TIME",
		 "SOURCE_NAME",
		 "SOURCE_SCHEMA",
		 "SOURCE_VERSION",
		 "EXPLAIN_LEVEL",
		 "STMTNO",
		 "SECTNO")
	ON DELETE CASCADE
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."SPECIMENLABEL"

ALTER TABLE "JRUAN   "."SPECIMENLABEL" 
	ADD CONSTRAINT "FK1E8F38CCA2039B9D" FOREIGN KEY
		("GEOSPOT_ID")
	REFERENCES "JRUAN   "."GEOSPOT"
		("GEOSPOT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."ALGORITHM"

ALTER TABLE "JRUAN   "."ALGORITHM" 
	ADD CONSTRAINT "FKB388C44F92E6A38E" FOREIGN KEY
		("USERTYPE_ID")
	REFERENCES "JRUAN   "."USERTYPE"
		("USERTYPE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."ALGORITHM" 
	ADD CONSTRAINT "FKB388C44F9698D32E" FOREIGN KEY
		("POLYTCOUNT_ID")
	REFERENCES "JRUAN   "."POLYTCOUNT"
		("POLYTCOUNT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."ALGORITHM" 
	ADD CONSTRAINT "FKB388C44FC6E814E6" FOREIGN KEY
		("GAPMODE_ID")
	REFERENCES "JRUAN   "."GAPMODE"
		("GAPMODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."ANALYSIS"

ALTER TABLE "JRUAN   "."ANALYSIS" 
	ADD CONSTRAINT "FKF19622DC3C572C3C" FOREIGN KEY
		("STUDY_ID")
	REFERENCES "JRUAN   "."STUDY"
		("STUDY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."ANALYSISSTEP"

ALTER TABLE "JRUAN   "."ANALYSISSTEP" 
	ADD CONSTRAINT "FK21F853A848A2817C" FOREIGN KEY
		("ALGORITHM_ID")
	REFERENCES "JRUAN   "."ALGORITHM"
		("ALGORITHM_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."ANALYSISSTEP" 
	ADD CONSTRAINT "FK21F853A865EDD5F8" FOREIGN KEY
		("SOFTWARE_ID")
	REFERENCES "JRUAN   "."SOFTWARE"
		("SOFTWARE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."ANALYSISSTEP" 
	ADD CONSTRAINT "FK21F853A8D1884DD8" FOREIGN KEY
		("ANALYSIS_ID")
	REFERENCES "JRUAN   "."ANALYSIS"
		("ANALYSIS_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."ANALYZEDDATA"

ALTER TABLE "JRUAN   "."ANALYZEDDATA" 
	ADD CONSTRAINT "FK8C9618424BA97F78" FOREIGN KEY
		("ANALYSISSTEP_ID")
	REFERENCES "JRUAN   "."ANALYSISSTEP"
		("ANALYSISSTEP_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."ANALYZEDDATA" 
	ADD CONSTRAINT "FK8C96184255961AEE" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."ANALYZEDDATA" 
	ADD CONSTRAINT "FK8C961842B710CB23" FOREIGN KEY
		("PHYLOTREE_ID")
	REFERENCES "JRUAN   "."PHYLOTREE"
		("PHYLOTREE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."ANCESTRALSTATE"

ALTER TABLE "JRUAN   "."ANCESTRALSTATE" 
	ADD CONSTRAINT "FK3FA14284684F6406" FOREIGN KEY
		("ANCSTATESET_ID")
	REFERENCES "JRUAN   "."ANCSTATESET"
		("ANCSTATESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."ANCESTRALSTATE" 
	ADD CONSTRAINT "FK3FA14284F4803CE6" FOREIGN KEY
		("DISCRETECHARSTATE_ID")
	REFERENCES "JRUAN   "."DISCRETECHARSTATE"
		("DISCRETECHARSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."ANCSTATESET"

ALTER TABLE "JRUAN   "."ANCSTATESET" 
	ADD CONSTRAINT "FK879339E7A414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CHARGROUP"

ALTER TABLE "JRUAN   "."CHARGROUP" 
	ADD CONSTRAINT "FK3AF18C91AA11DC6" FOREIGN KEY
		("CHARPARTITION_ID")
	REFERENCES "JRUAN   "."CHARPARTITION"
		("CHARPARTITION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CHARPARTITION"

ALTER TABLE "JRUAN   "."CHARPARTITION" 
	ADD CONSTRAINT "FKDEA9F834A414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CHARSET"

ALTER TABLE "JRUAN   "."CHARSET" 
	ADD CONSTRAINT "FK56D8ED2CA414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CHARWEIGHT"

ALTER TABLE "JRUAN   "."CHARWEIGHT" 
	ADD CONSTRAINT "FK8CC7694EE9B425A6" FOREIGN KEY
		("CHARWEIGHTSET_ID")
	REFERENCES "JRUAN   "."CHARWEIGHTSET"
		("CHARWEIGHTSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CHARWEIGHTSET"

ALTER TABLE "JRUAN   "."CHARWEIGHTSET" 
	ADD CONSTRAINT "FK99B8AC34A414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CITATION"

ALTER TABLE "JRUAN   "."CITATION" 
	ADD CONSTRAINT "FKD8A7FAE74C983658" FOREIGN KEY
		("CITATIONSTATUS_ID")
	REFERENCES "JRUAN   "."CITATIONSTATUS"
		("CITATIONSTATUS_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CITATION_AUTHOR"

ALTER TABLE "JRUAN   "."CITATION_AUTHOR" 
	ADD CONSTRAINT "FK24AA55E36707573B" FOREIGN KEY
		("AUTHORS_PERSON_ID")
	REFERENCES "JRUAN   "."PERSON"
		("PERSON_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CITATION_AUTHOR" 
	ADD CONSTRAINT "FK24AA55E38E1E4DF8" FOREIGN KEY
		("CITATION_ID")
	REFERENCES "JRUAN   "."CITATION"
		("CITATION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CITATION_EDITOR"

ALTER TABLE "JRUAN   "."CITATION_EDITOR" 
	ADD CONSTRAINT "FK2A8955C568F6F619" FOREIGN KEY
		("EDITORS_PERSON_ID")
	REFERENCES "JRUAN   "."PERSON"
		("PERSON_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CITATION_EDITOR" 
	ADD CONSTRAINT "FK2A8955C5EC93F501" FOREIGN KEY
		("CITATION_ID")
	REFERENCES "JRUAN   "."CITATION"
		("CITATION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."COMPOUND_ELEMENT"

ALTER TABLE "JRUAN   "."COMPOUND_ELEMENT" 
	ADD CONSTRAINT "FK31183048459091E5" FOREIGN KEY
		("ELEMENT_ID")
	REFERENCES "JRUAN   "."MATRIXELEMENT"
		("MATRIXELEMENT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."COMPOUND_ELEMENT" 
	ADD CONSTRAINT "FK311830485F4F7CEB" FOREIGN KEY
		("COMPOUND_ID")
	REFERENCES "JRUAN   "."MATRIXELEMENT"
		("MATRIXELEMENT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CONTANCSTATE_VALUE"

ALTER TABLE "JRUAN   "."CONTANCSTATE_VALUE" 
	ADD CONSTRAINT "FKA84B8C3FD450D2BD" FOREIGN KEY
		("ANCSTATE_ID")
	REFERENCES "JRUAN   "."ANCESTRALSTATE"
		("ANCESTRALSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CSTREENODE"

ALTER TABLE "JRUAN   "."CSTREENODE" 
	ADD CONSTRAINT "FK82B9AB10C6999FCE" FOREIGN KEY
		("CSTREE_ID")
	REFERENCES "JRUAN   "."USERTYPE"
		("USERTYPE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CSTREENODE" 
	ADD CONSTRAINT "FK82B9AB10F4803CE6" FOREIGN KEY
		("DISCRETECHARSTATE_ID")
	REFERENCES "JRUAN   "."DISCRETECHARSTATE"
		("DISCRETECHARSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CSTREENODE" 
	ADD CONSTRAINT "FK82B9AB10F572A92" FOREIGN KEY
		("PARENTNODE_ID")
	REFERENCES "JRUAN   "."CSTREENODE"
		("CSTREENODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CHARGROUP_COLRANGE"

ALTER TABLE "JRUAN   "."CHARGROUP_COLRANGE" 
	ADD CONSTRAINT "FKB2D8C29379A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CHARGROUP_COLRANGE" 
	ADD CONSTRAINT "FKB2D8C293971FFFA6" FOREIGN KEY
		("CHARGROUP_ID")
	REFERENCES "JRUAN   "."CHARGROUP"
		("CHARGROUP_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CHARSET_COLRANGE"

ALTER TABLE "JRUAN   "."CHARSET_COLRANGE" 
	ADD CONSTRAINT "FK2CBD90416D5B50" FOREIGN KEY
		("CHARSET_ID")
	REFERENCES "JRUAN   "."CHARSET"
		("CHARSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CHARSET_COLRANGE" 
	ADD CONSTRAINT "FK2CBD9079A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CHARWEIGHT_COLRANGE"

ALTER TABLE "JRUAN   "."CHARWEIGHT_COLRANGE" 
	ADD CONSTRAINT "FK54CA674E79A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CHARWEIGHT_COLRANGE" 
	ADD CONSTRAINT "FK54CA674EF9A75EE" FOREIGN KEY
		("CHARWEIGHT_ID")
	REFERENCES "JRUAN   "."CHARWEIGHT"
		("CHARWEIGHT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CODERECORD_COLRANGE"

ALTER TABLE "JRUAN   "."CODERECORD_COLRANGE" 
	ADD CONSTRAINT "FKA3E6C61E79A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CODERECORD_COLRANGE" 
	ADD CONSTRAINT "FKA3E6C61EDC51C546" FOREIGN KEY
		("GENETICCODERECORD_ID")
	REFERENCES "JRUAN   "."GENETICCODERECORD"
		("GENETICCODERECORD_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CODONCHAR1_COLRANGE"

ALTER TABLE "JRUAN   "."CODONCHAR1_COLRANGE" 
	ADD CONSTRAINT "FKDA5AD4F8491DB20E" FOREIGN KEY
		("CODONPOSITIONSET_ID")
	REFERENCES "JRUAN   "."CODONPOSITIONSET"
		("CODONPOSITIONSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CODONCHAR1_COLRANGE" 
	ADD CONSTRAINT "FKDA5AD4F879A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CODONCHAR2_COLRANGE"

ALTER TABLE "JRUAN   "."CODONCHAR2_COLRANGE" 
	ADD CONSTRAINT "FKCEA44617491DB20E" FOREIGN KEY
		("CODONPOSITIONSET_ID")
	REFERENCES "JRUAN   "."CODONPOSITIONSET"
		("CODONPOSITIONSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CODONCHAR2_COLRANGE" 
	ADD CONSTRAINT "FKCEA4461779A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CODONCHAR3_COLRANGE"

ALTER TABLE "JRUAN   "."CODONCHAR3_COLRANGE" 
	ADD CONSTRAINT "FKC2EDB736491DB20E" FOREIGN KEY
		("CODONPOSITIONSET_ID")
	REFERENCES "JRUAN   "."CODONPOSITIONSET"
		("CODONPOSITIONSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CODONCHAR3_COLRANGE" 
	ADD CONSTRAINT "FKC2EDB73679A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CODONNONCODING_COLRANGE"

ALTER TABLE "JRUAN   "."CODONNONCODING_COLRANGE" 
	ADD CONSTRAINT "FK307897FC491DB20E" FOREIGN KEY
		("CODONPOSITIONSET_ID")
	REFERENCES "JRUAN   "."CODONPOSITIONSET"
		("CODONPOSITIONSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."CODONNONCODING_COLRANGE" 
	ADD CONSTRAINT "FK307897FC79A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."CODONPOSITIONSET"

ALTER TABLE "JRUAN   "."CODONPOSITIONSET" 
	ADD CONSTRAINT "FK4E501CC2A414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."DISCRETECHARSTATE"

ALTER TABLE "JRUAN   "."DISCRETECHARSTATE" 
	ADD CONSTRAINT "FK2EEF2802163C67CE" FOREIGN KEY
		("STATESET_ID")
	REFERENCES "JRUAN   "."STATESET"
		("STATESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."DISCRETECHARSTATE" 
	ADD CONSTRAINT "FK2EEF2802C7BEAAFE" FOREIGN KEY
		("ANCESTRALSTATE_ID")
	REFERENCES "JRUAN   "."ANCESTRALSTATE"
		("ANCESTRALSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."DISCRETECHARSTATE" 
	ADD CONSTRAINT "FK2EEF2802FE41A723" FOREIGN KEY
		("PHYLOCHAR_ID")
	REFERENCES "JRUAN   "."PHYLOCHAR"
		("PHYLOCHAR_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."DISTANCEMATRIXELEMENT"

ALTER TABLE "JRUAN   "."DISTANCEMATRIXELEMENT" 
	ADD CONSTRAINT "FK92D3DDE61F08BAE7" FOREIGN KEY
		("ROWLABEL_ID")
	REFERENCES "JRUAN   "."TAXONLABEL"
		("TAXONLABEL_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."DISTANCEMATRIXELEMENT" 
	ADD CONSTRAINT "FK92D3DDE64B8EF343" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."DISTANCEMATRIXELEMENT" 
	ADD CONSTRAINT "FK92D3DDE6C1429863" FOREIGN KEY
		("COLUMNLABEL_ID")
	REFERENCES "JRUAN   "."TAXONLABEL"
		("TAXONLABEL_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."GENETICCODESET"

ALTER TABLE "JRUAN   "."GENETICCODESET" 
	ADD CONSTRAINT "FK6A12F7DCA414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."GENETICCODERECORD"

ALTER TABLE "JRUAN   "."GENETICCODERECORD" 
	ADD CONSTRAINT "FK237932B76CB73FC6" FOREIGN KEY
		("GENETICCODE_ID")
	REFERENCES "JRUAN   "."GENETICCODE"
		("GENETICCODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."GENETICCODERECORD" 
	ADD CONSTRAINT "FK237932B782D8ECCE" FOREIGN KEY
		("GENETICCODESET_ID")
	REFERENCES "JRUAN   "."GENETICCODESET"
		("GENETICCODESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."ITEMVALUE"

ALTER TABLE "JRUAN   "."ITEMVALUE" 
	ADD CONSTRAINT "FK27B41A1E459091E5" FOREIGN KEY
		("ELEMENT_ID")
	REFERENCES "JRUAN   "."MATRIXELEMENT"
		("MATRIXELEMENT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."LEFTCHANGESET_CHARSTATE"

ALTER TABLE "JRUAN   "."LEFTCHANGESET_CHARSTATE" 
	ADD CONSTRAINT "FKC887720775763EAE" FOREIGN KEY
		("STATECHANGESET_ID")
	REFERENCES "JRUAN   "."STATECHANGESET"
		("STATECHANGESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."LEFTCHANGESET_CHARSTATE" 
	ADD CONSTRAINT "FKC8877207F4803CE6" FOREIGN KEY
		("DISCRETECHARSTATE_ID")
	REFERENCES "JRUAN   "."DISCRETECHARSTATE"
		("DISCRETECHARSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."MATRIX"

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC13C572C3C" FOREIGN KEY
		("STUDY_ID")
	REFERENCES "JRUAN   "."STUDY"
		("STUDY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC145534A9C" FOREIGN KEY
		("CHARSET_ID")
	REFERENCES "JRUAN   "."CHARSET"
		("CHARSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC1491DB20E" FOREIGN KEY
		("CODONPOSITIONSET_ID")
	REFERENCES "JRUAN   "."CODONPOSITIONSET"
		("CODONPOSITIONSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC14CE484AE" FOREIGN KEY
		("MATRIXDATATYPE_ID")
	REFERENCES "JRUAN   "."MATRIXDATATYPE"
		("MATRIXDATATYPE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC14D737E46" FOREIGN KEY
		("TYPESET_ID")
	REFERENCES "JRUAN   "."TYPESET"
		("TYPESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC1684F6406" FOREIGN KEY
		("ANCSTATESET_ID")
	REFERENCES "JRUAN   "."ANCSTATESET"
		("ANCSTATESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC191BD3C8E" FOREIGN KEY
		("MATRIXKIND_ID")
	REFERENCES "JRUAN   "."MATRIXKIND"
		("MATRIXKIND_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC1E310471D" FOREIGN KEY
		("TAXONLABELSET_ID")
	REFERENCES "JRUAN   "."TAXONLABELSET"
		("TAXONLABELSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX" 
	ADD CONSTRAINT "FK87208BC1E9B425A6" FOREIGN KEY
		("CHARWEIGHTSET_ID")
	REFERENCES "JRUAN   "."CHARWEIGHTSET"
		("CHARWEIGHTSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."MATRIXCOLUMN"

ALTER TABLE "JRUAN   "."MATRIXCOLUMN" 
	ADD CONSTRAINT "FK9B0BE57A414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIXCOLUMN" 
	ADD CONSTRAINT "FK9B0BE57BED40086" FOREIGN KEY
		("STATEFORMAT_ID")
	REFERENCES "JRUAN   "."STATEFORMAT"
		("STATEFORMAT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIXCOLUMN" 
	ADD CONSTRAINT "FK9B0BE57F5DECA46" FOREIGN KEY
		("PHYLOCHAR_ID")
	REFERENCES "JRUAN   "."PHYLOCHAR"
		("PHYLOCHAR_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."MATRIXCOLUMN_ITEMDEFINITION"

ALTER TABLE "JRUAN   "."MATRIXCOLUMN_ITEMDEFINITION" 
	ADD CONSTRAINT "FKB556F8E405A7CEE" FOREIGN KEY
		("ITEMDEFINITION_ID")
	REFERENCES "JRUAN   "."ITEMDEFINITION"
		("ITEMDEFINITION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIXCOLUMN_ITEMDEFINITION" 
	ADD CONSTRAINT "FKB556F8E8B2E884E" FOREIGN KEY
		("MATRIXCOLUMN_ID")
	REFERENCES "JRUAN   "."MATRIXCOLUMN"
		("MATRIXCOLUMN_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."MATRIXDATATYPE"

ALTER TABLE "JRUAN   "."MATRIXDATATYPE" 
	ADD CONSTRAINT "FKF054C4A5F5DECA46" FOREIGN KEY
		("PHYLOCHAR_ID")
	REFERENCES "JRUAN   "."PHYLOCHAR"
		("PHYLOCHAR_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."MATRIXELEMENT"

ALTER TABLE "JRUAN   "."MATRIXELEMENT" 
	ADD CONSTRAINT "FK90AE93FB405A7CEE" FOREIGN KEY
		("ITEMDEFINITION_ID")
	REFERENCES "JRUAN   "."ITEMDEFINITION"
		("ITEMDEFINITION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIXELEMENT" 
	ADD CONSTRAINT "FK90AE93FB8B2E884E" FOREIGN KEY
		("MATRIXCOLUMN_ID")
	REFERENCES "JRUAN   "."MATRIXCOLUMN"
		("MATRIXCOLUMN_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIXELEMENT" 
	ADD CONSTRAINT "FK90AE93FBE7B3CDA6" FOREIGN KEY
		("MATRIXROW_ID")
	REFERENCES "JRUAN   "."MATRIXROW"
		("MATRIXROW_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIXELEMENT" 
	ADD CONSTRAINT "FK90AE93FBF4803CE6" FOREIGN KEY
		("DISCRETECHARSTATE_ID")
	REFERENCES "JRUAN   "."DISCRETECHARSTATE"
		("DISCRETECHARSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."MATRIXROW"

ALTER TABLE "JRUAN   "."MATRIXROW" 
	ADD CONSTRAINT "FKE4688E5963AB9FD7" FOREIGN KEY
		("TAXONLABEL_ID")
	REFERENCES "JRUAN   "."TAXONLABEL"
		("TAXONLABEL_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIXROW" 
	ADD CONSTRAINT "FKE4688E59A414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."MATRIX_ITEMDEFINITION"

ALTER TABLE "JRUAN   "."MATRIX_ITEMDEFINITION" 
	ADD CONSTRAINT "FK5717E0E4405A7CEE" FOREIGN KEY
		("ITEMDEFINITION_ID")
	REFERENCES "JRUAN   "."ITEMDEFINITION"
		("ITEMDEFINITION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."MATRIX_ITEMDEFINITION" 
	ADD CONSTRAINT "FK5717E0E4AC5C19DD" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."PHYLOTREE"

ALTER TABLE "JRUAN   "."PHYLOTREE" 
	ADD CONSTRAINT "FK76F2E4423C572C3C" FOREIGN KEY
		("STUDY_ID")
	REFERENCES "JRUAN   "."STUDY"
		("STUDY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREE" 
	ADD CONSTRAINT "FK76F2E442A3015CE3" FOREIGN KEY
		("TREEATTRIBUTE_ID")
	REFERENCES "JRUAN   "."TREEATTRIBUTE"
		("TREEATTRIBUTE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREE" 
	ADD CONSTRAINT "FK76F2E442BFD107C3" FOREIGN KEY
		("TREEBLOCK_ID")
	REFERENCES "JRUAN   "."TREEBLOCK"
		("TREEBLOCK_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREE" 
	ADD CONSTRAINT "FK76F2E442EA08B443" FOREIGN KEY
		("TREEQUALITY_ID")
	REFERENCES "JRUAN   "."TREEQUALITY"
		("TREEQUALITY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREE" 
	ADD CONSTRAINT "FK76F2E442F3D1CF03" FOREIGN KEY
		("ROOTNODE_ID")
	REFERENCES "JRUAN   "."PHYLOTREENODE"
		("PHYLOTREENODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREE" 
	ADD CONSTRAINT "FK76F2E442F5AEA931" FOREIGN KEY
		("TREETYPE_ID")
	REFERENCES "JRUAN   "."TREETYPE"
		("TREETYPE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREE" 
	ADD CONSTRAINT "FK76F2E442FE2812F1" FOREIGN KEY
		("TREEKIND_ID")
	REFERENCES "JRUAN   "."TREEKIND"
		("TREEKIND_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."PHYLOTREENODE"

ALTER TABLE "JRUAN   "."PHYLOTREENODE" 
	ADD CONSTRAINT "FK3EA79944271A5763" FOREIGN KEY
		("NODEATTRIBUTE_ID")
	REFERENCES "JRUAN   "."NODEATTRIBUTE"
		("NODEATTRIBUTE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREENODE" 
	ADD CONSTRAINT "FK3EA799443C348165" FOREIGN KEY
		("SIBLING_ID")
	REFERENCES "JRUAN   "."PHYLOTREENODE"
		("PHYLOTREENODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREENODE" 
	ADD CONSTRAINT "FK3EA79944434FDCCB" FOREIGN KEY
		("CHILD_ID")
	REFERENCES "JRUAN   "."PHYLOTREENODE"
		("PHYLOTREENODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREENODE" 
	ADD CONSTRAINT "FK3EA799445BCC767D" FOREIGN KEY
		("PARENT_ID")
	REFERENCES "JRUAN   "."PHYLOTREENODE"
		("PHYLOTREENODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREENODE" 
	ADD CONSTRAINT "FK3EA7994463AB9FD7" FOREIGN KEY
		("TAXONLABEL_ID")
	REFERENCES "JRUAN   "."TAXONLABEL"
		("TAXONLABEL_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."PHYLOTREENODE" 
	ADD CONSTRAINT "FK3EA79944B710CB23" FOREIGN KEY
		("PHYLOTREE_ID")
	REFERENCES "JRUAN   "."PHYLOTREE"
		("PHYLOTREE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."RIGHTCHANGESET_CHARSTATE"

ALTER TABLE "JRUAN   "."RIGHTCHANGESET_CHARSTATE" 
	ADD CONSTRAINT "FKC8AFC9F275763EAE" FOREIGN KEY
		("STATECHANGESET_ID")
	REFERENCES "JRUAN   "."STATECHANGESET"
		("STATECHANGESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."RIGHTCHANGESET_CHARSTATE" 
	ADD CONSTRAINT "FKC8AFC9F2F4803CE6" FOREIGN KEY
		("DISCRETECHARSTATE_ID")
	REFERENCES "JRUAN   "."DISCRETECHARSTATE"
		("DISCRETECHARSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."ROWSEGMENT"

ALTER TABLE "JRUAN   "."ROWSEGMENT" 
	ADD CONSTRAINT "FKEE9AE81963AB9FD7" FOREIGN KEY
		("TAXONLABEL_ID")
	REFERENCES "JRUAN   "."TAXONLABEL"
		("TAXONLABEL_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."ROWSEGMENT" 
	ADD CONSTRAINT "FKEE9AE819E7B3CDA6" FOREIGN KEY
		("MATRIXROW_ID")
	REFERENCES "JRUAN   "."MATRIXROW"
		("MATRIXROW_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."STATEMODIFIER"

ALTER TABLE "JRUAN   "."STATEMODIFIER" 
	ADD CONSTRAINT "FKD157BE48459091E5" FOREIGN KEY
		("ELEMENT_ID")
	REFERENCES "JRUAN   "."MATRIXELEMENT"
		("MATRIXELEMENT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."STATEMODIFIER" 
	ADD CONSTRAINT "FKD157BE48BED40086" FOREIGN KEY
		("STATEFORMAT_ID")
	REFERENCES "JRUAN   "."STATEFORMAT"
		("STATEFORMAT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."STATEMODIFIER" 
	ADD CONSTRAINT "FKD157BE48F4803CE6" FOREIGN KEY
		("DISCRETECHARSTATE_ID")
	REFERENCES "JRUAN   "."DISCRETECHARSTATE"
		("DISCRETECHARSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."STATESET"

ALTER TABLE "JRUAN   "."STATESET" 
	ADD CONSTRAINT "FK7D38523150CBAB47" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."STEPMATRIXELEMENT"

ALTER TABLE "JRUAN   "."STEPMATRIXELEMENT" 
	ADD CONSTRAINT "FK891100AF6E972A88" FOREIGN KEY
		("STATE1_ID")
	REFERENCES "JRUAN   "."DISCRETECHARSTATE"
		("DISCRETECHARSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."STEPMATRIXELEMENT" 
	ADD CONSTRAINT "FK891100AF6E979EE7" FOREIGN KEY
		("STATE2_ID")
	REFERENCES "JRUAN   "."DISCRETECHARSTATE"
		("DISCRETECHARSTATE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."STEPMATRIXELEMENT" 
	ADD CONSTRAINT "FK891100AF9E8198E" FOREIGN KEY
		("STEPMATRIX_ID")
	REFERENCES "JRUAN   "."USERTYPE"
		("USERTYPE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."STUDY"

ALTER TABLE "JRUAN   "."STUDY" 
	ADD CONSTRAINT "FK4B915A9255A519C" FOREIGN KEY
		("STUDYSTATUS_ID")
	REFERENCES "JRUAN   "."STUDYSTATUS"
		("STUDYSTATUS_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."STUDY" 
	ADD CONSTRAINT "FK4B915A98E1E4DF8" FOREIGN KEY
		("CITATION_ID")
	REFERENCES "JRUAN   "."CITATION"
		("CITATION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."STUDY" 
	ADD CONSTRAINT "FK4B915A9BEF300B2" FOREIGN KEY
		("USER_ID")
	REFERENCES "JRUAN   "."USER"
		("USER_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."SUBMISSION"

ALTER TABLE "JRUAN   "."SUBMISSION" 
	ADD CONSTRAINT "FKA120274C3C572C3C" FOREIGN KEY
		("STUDY_ID")
	REFERENCES "JRUAN   "."STUDY"
		("STUDY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."SUBMISSION" 
	ADD CONSTRAINT "FKA120274CBEF300B2" FOREIGN KEY
		("USER_ID")
	REFERENCES "JRUAN   "."USER"
		("USER_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."SUB_MATRIX"

ALTER TABLE "JRUAN   "."SUB_MATRIX" 
	ADD CONSTRAINT "FK5F26A2C055961AEE" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."SUB_MATRIX" 
	ADD CONSTRAINT "FK5F26A2C08DFE4858" FOREIGN KEY
		("SUBMISSION_ID")
	REFERENCES "JRUAN   "."SUBMISSION"
		("SUBMISSION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."SUB_TAXONLABEL"

ALTER TABLE "JRUAN   "."SUB_TAXONLABEL" 
	ADD CONSTRAINT "FK86909E963AB9FD7" FOREIGN KEY
		("TAXONLABEL_ID")
	REFERENCES "JRUAN   "."TAXONLABEL"
		("TAXONLABEL_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."SUB_TAXONLABEL" 
	ADD CONSTRAINT "FK86909E98DFE4858" FOREIGN KEY
		("SUBMISSION_ID")
	REFERENCES "JRUAN   "."SUBMISSION"
		("SUBMISSION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."SUB_TREEBLOCK"

ALTER TABLE "JRUAN   "."SUB_TREEBLOCK" 
	ADD CONSTRAINT "FK94D508308DFE4858" FOREIGN KEY
		("SUBMISSION_ID")
	REFERENCES "JRUAN   "."SUBMISSION"
		("SUBMISSION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."SUB_TREEBLOCK" 
	ADD CONSTRAINT "FK94D50830BFD107C3" FOREIGN KEY
		("TREEBLOCK_ID")
	REFERENCES "JRUAN   "."TREEBLOCK"
		("TREEBLOCK_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."STUDY_NEXUSFILE"

ALTER TABLE "JRUAN   "."STUDY_NEXUSFILE" 
	ADD CONSTRAINT "FK47FC1EE53C572C3C" FOREIGN KEY
		("STUDY_ID")
	REFERENCES "JRUAN   "."STUDY"
		("STUDY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TAXONLABEL"

ALTER TABLE "JRUAN   "."TAXONLABEL" 
	ADD CONSTRAINT "FK5F548A6A3C1B6F7" FOREIGN KEY
		("TAXONVARIANT_ID")
	REFERENCES "JRUAN   "."TAXONVARIANT"
		("TAXONVARIANT_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."TAXONLABEL" 
	ADD CONSTRAINT "FK5F548A6A3C572C3C" FOREIGN KEY
		("STUDY_ID")
	REFERENCES "JRUAN   "."STUDY"
		("STUDY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TAXONLABELGROUP"

ALTER TABLE "JRUAN   "."TAXONLABELGROUP" 
	ADD CONSTRAINT "FK4AE2663513A813DD" FOREIGN KEY
		("TAXONLABELPARTITION_ID")
	REFERENCES "JRUAN   "."TAXONLABELPARTITION"
		("TAXONLABELPARTITION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TAXONLABELROUP_TAXONLABEL"

ALTER TABLE "JRUAN   "."TAXONLABELROUP_TAXONLABEL" 
	ADD CONSTRAINT "FK4B1D0BC7294B993D" FOREIGN KEY
		("TAXONLABELGROUP_ID")
	REFERENCES "JRUAN   "."TAXONLABELGROUP"
		("TAXONLABELGROUP_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."TAXONLABELROUP_TAXONLABEL" 
	ADD CONSTRAINT "FK4B1D0BC763AB9FD7" FOREIGN KEY
		("TAXONLABEL_ID")
	REFERENCES "JRUAN   "."TAXONLABEL"
		("TAXONLABEL_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TAXONLINK"

ALTER TABLE "JRUAN   "."TAXONLINK" 
	ADD CONSTRAINT "FKC102D9A41DE2FCDD" FOREIGN KEY
		("TAXON_ID")
	REFERENCES "JRUAN   "."TAXON"
		("TAXON_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."TAXONLINK" 
	ADD CONSTRAINT "FKC102D9A43BF5F2F7" FOREIGN KEY
		("TAXONAUTHORITY_ID")
	REFERENCES "JRUAN   "."TAXONAUTHORITY"
		("TAXONAUTHORITY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TAXONSET_TAXON"

ALTER TABLE "JRUAN   "."TAXONSET_TAXON" 
	ADD CONSTRAINT "FKC656C90313C28457" FOREIGN KEY
		("TAXONSET_ID")
	REFERENCES "JRUAN   "."TAXONSET"
		("TAXONSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."TAXONSET_TAXON" 
	ADD CONSTRAINT "FKC656C9031DE2FCDD" FOREIGN KEY
		("TAXON_ID")
	REFERENCES "JRUAN   "."TAXON"
		("TAXON_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TAXONVARIANT"

ALTER TABLE "JRUAN   "."TAXONVARIANT" 
	ADD CONSTRAINT "FKEE3D127B1DE2FCDD" FOREIGN KEY
		("TAXON_ID")
	REFERENCES "JRUAN   "."TAXON"
		("TAXON_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TREEBLOCK"

ALTER TABLE "JRUAN   "."TREEBLOCK" 
	ADD CONSTRAINT "FKA826F38FE310471D" FOREIGN KEY
		("TAXONLABELSET_ID")
	REFERENCES "JRUAN   "."TAXONLABELSET"
		("TAXONLABELSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TREEGROUP"

ALTER TABLE "JRUAN   "."TREEGROUP" 
	ADD CONSTRAINT "FKA870258180CBD223" FOREIGN KEY
		("TREEPARTITION_ID")
	REFERENCES "JRUAN   "."TREEPARTITION"
		("TREEPARTITION_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TREEGROUP_PHYLOTREE"

ALTER TABLE "JRUAN   "."TREEGROUP_PHYLOTREE" 
	ADD CONSTRAINT "FKFB7D7045E56A83" FOREIGN KEY
		("TREEGROUP_ID")
	REFERENCES "JRUAN   "."TREEGROUP"
		("TREEGROUP_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."TREEGROUP_PHYLOTREE" 
	ADD CONSTRAINT "FKFB7D704B710CB23" FOREIGN KEY
		("PHYLOTREE_ID")
	REFERENCES "JRUAN   "."PHYLOTREE"
		("PHYLOTREE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TREENODEEDGE"

ALTER TABLE "JRUAN   "."TREENODEEDGE" 
	ADD CONSTRAINT "FK7767285D1851763B" FOREIGN KEY
		("PARENTNODE_ID")
	REFERENCES "JRUAN   "."PHYLOTREENODE"
		("PHYLOTREENODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."TREENODEEDGE" 
	ADD CONSTRAINT "FK7767285D27FD0589" FOREIGN KEY
		("CHILDNODE_ID")
	REFERENCES "JRUAN   "."PHYLOTREENODE"
		("PHYLOTREENODE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TREESET_PHYLOTREE"

ALTER TABLE "JRUAN   "."TREESET_PHYLOTREE" 
	ADD CONSTRAINT "FK31FC19A7B710CB23" FOREIGN KEY
		("PHYLOTREE_ID")
	REFERENCES "JRUAN   "."PHYLOTREE"
		("PHYLOTREE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."TREESET_PHYLOTREE" 
	ADD CONSTRAINT "FK31FC19A7EC59B1E3" FOREIGN KEY
		("TREESET_ID")
	REFERENCES "JRUAN   "."TREESET"
		("TREESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TYPESET"

ALTER TABLE "JRUAN   "."TYPESET" 
	ADD CONSTRAINT "FKF7F2B6C8A414944F" FOREIGN KEY
		("MATRIX_ID")
	REFERENCES "JRUAN   "."MATRIX"
		("MATRIX_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TAXONLABELSET"

ALTER TABLE "JRUAN   "."TAXONLABELSET" 
	ADD CONSTRAINT "FK28D3A5983C572C3C" FOREIGN KEY
		("STUDY_ID")
	REFERENCES "JRUAN   "."STUDY"
		("STUDY_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."TAXONLABELSET_TAXONLABEL"

ALTER TABLE "JRUAN   "."TAXONLABELSET_TAXONLABEL" 
	ADD CONSTRAINT "FK2EB54B7163AB9FD7" FOREIGN KEY
		("TAXONLABEL_ID")
	REFERENCES "JRUAN   "."TAXONLABEL"
		("TAXONLABEL_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."TAXONLABELSET_TAXONLABEL" 
	ADD CONSTRAINT "FK2EB54B71E310471D" FOREIGN KEY
		("TAXONLABELSET_ID")
	REFERENCES "JRUAN   "."TAXONLABELSET"
		("TAXONLABELSET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."USER"

ALTER TABLE "JRUAN   "."USER" 
	ADD CONSTRAINT "FK27E3CBE3910672" FOREIGN KEY
		("PERSON_ID")
	REFERENCES "JRUAN   "."PERSON"
		("PERSON_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."USER" 
	ADD CONSTRAINT "FK27E3CBF59DD12" FOREIGN KEY
		("USERROLE_ID")
	REFERENCES "JRUAN   "."USERROLE"
		("USERROLE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."USERTYPERECORD"

ALTER TABLE "JRUAN   "."USERTYPERECORD" 
	ADD CONSTRAINT "FK136AF6164D737E46" FOREIGN KEY
		("TYPESET_ID")
	REFERENCES "JRUAN   "."TYPESET"
		("TYPESET_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."USERTYPERECORD" 
	ADD CONSTRAINT "FK136AF61692E6A38E" FOREIGN KEY
		("USERTYPE_ID")
	REFERENCES "JRUAN   "."USERTYPE"
		("USERTYPE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

-- DDL Statements for foreign keys on Table "JRUAN   "."USERTYPERRD_COLRANGE"

ALTER TABLE "JRUAN   "."USERTYPERRD_COLRANGE" 
	ADD CONSTRAINT "FK405805DD79A523E6" FOREIGN KEY
		("COLUMNRANGE_ID")
	REFERENCES "JRUAN   "."COLUMNRANGE"
		("COLUMNRANGE_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;

ALTER TABLE "JRUAN   "."USERTYPERRD_COLRANGE" 
	ADD CONSTRAINT "FK405805DDC009330E" FOREIGN KEY
		("USERTYPERECORD_ID")
	REFERENCES "JRUAN   "."USERTYPERECORD"
		("USERTYPERECORD_ID")
	ON DELETE NO ACTION
	ON UPDATE NO ACTION
	ENFORCED
	ENABLE QUERY OPTIMIZATION;


COMMIT WORK;

CONNECT RESET;

TERMINATE;
