1 /* Unique Ids sequence generator */
3 drop sequence SEQ_GEN_SEQUENCE;
4 create sequence SEQ_GEN_SEQUENCE INCREMENT BY 50;
9 DROP TABLE IF EXISTS attribute_group CASCADE;
10 CREATE TABLE attribute_group (
11 id bigint NOT NULL PRIMARY KEY
14 DROP TABLE IF EXISTS attribute CASCADE;
15 CREATE TABLE attribute (
16 id bigint NOT NULL PRIMARY KEY,
20 attribute_group_id bigint REFERENCES attribute_group (id),
27 DROP TABLE IF EXISTS gde_file CASCADE;
28 CREATE TABLE gde_file (
29 id bigint NOT NULL PRIMARY KEY,
32 checksum varchar(255),
33 creation_date timestamp,
34 update_date timestamp,
37 deletion_date timestamp,
38 attribute_group_id bigint REFERENCES attribute_group (id),
39 data_profile_id bigint REFERENCES profile (id)
42 DROP TABLE IF EXISTS chunk CASCADE;
44 id bigint NOT NULL PRIMARY KEY,
45 file_id bigint NOT NULL REFERENCES gde_file (id),
47 checksum varchar(255),
54 DROP TABLE IF EXISTS study CASCADE;
56 id bigint NOT NULL PRIMARY KEY,
58 creation_date timestamp,
59 update_date timestamp,
62 deletion_date timestamp,
63 attribute_group_id bigint REFERENCES attribute_group (id),
64 profile_id bigint REFERENCES profile (id)
69 DROP TABLE IF EXISTS profile CASCADE;
70 CREATE TABLE profile (
71 id bigint NOT NULL PRIMARY KEY,
75 DROP TABLE IF EXISTS profile_attribute CASCADE;
76 CREATE TABLE profile_attribute (
77 id bigint NOT NULL PRIMARY KEY,
81 profile_id bigint REFERENCES profile (id)