Revision 552
Added by Aaron Marcuse-Kubitza almost 13 years ago
vegbien.for_ERD.sql | ||
---|---|---|
76 | 76 |
CONSTRAINT namedplace_keys UNIQUE (placesystem , placename ) |
77 | 77 |
); |
78 | 78 |
|
79 |
CREATE TABLE place |
|
80 |
( |
|
81 |
locationplace_id serial NOT NULL, |
|
82 |
location_id integer NOT NULL, |
|
83 |
calculated boolean, |
|
84 |
namedplace_id integer NOT NULL, |
|
85 |
CONSTRAINT place_pkey PRIMARY KEY (locationplace_id ), |
|
86 |
CONSTRAINT place_location_id FOREIGN KEY (location_id) |
|
87 |
REFERENCES location (location_id) MATCH SIMPLE |
|
88 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
89 |
CONSTRAINT place_namedplace_id FOREIGN KEY (namedplace_id) |
|
90 |
REFERENCES namedplace (namedplace_id) MATCH SIMPLE |
|
91 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
92 |
CONSTRAINT place_keys UNIQUE (location_id , namedplace_id ) |
|
93 |
); |
|
94 |
|
|
79 | 95 |
CREATE TABLE project |
80 | 96 |
( |
81 | 97 |
project_id serial NOT NULL, |
... | ... | |
307 | 323 |
ON UPDATE CASCADE ON DELETE CASCADE |
308 | 324 |
); |
309 | 325 |
|
326 |
CREATE TABLE stratum |
|
327 |
( |
|
328 |
stratum_id serial NOT NULL, |
|
329 |
locationevent_id integer NOT NULL, |
|
330 |
stratumtype_id integer NOT NULL, |
|
331 |
stratummethod_id integer, |
|
332 |
stratumname character varying(30), |
|
333 |
stratumheight double precision, |
|
334 |
stratumbase double precision, |
|
335 |
stratumcover double precision, |
|
336 |
stratumdescription character varying(200), |
|
337 |
CONSTRAINT stratum_pkey PRIMARY KEY (stratum_id ), |
|
338 |
CONSTRAINT stratum_locationevent_id FOREIGN KEY (locationevent_id) |
|
339 |
REFERENCES locationevent (locationevent_id) MATCH SIMPLE |
|
340 |
ON UPDATE CASCADE ON DELETE CASCADE, |
|
341 |
); |
|
342 |
|
|
310 | 343 |
CREATE TABLE sizeclass -- A range of size measurements used to aggregate organisms. |
311 | 344 |
( |
312 | 345 |
sizeclass_id serial NOT NULL, |
Also available in: Unified diff
vegbien.ERD.mwb: Added stratum and place tables