Project

General

Profile

« Previous | Next » 

Revision 552

vegbien.ERD.mwb: Added stratum and place tables

View differences:

vegbien.for_ERD.my.sql
76 76
  CONSTRAINT namedplace_keys UNIQUE (placesystem , placename )
77 77
);
78 78

  
79
CREATE TABLE place
80
(
81
  locationplace_id int(11) NOT NULL AUTO_INCREMENT,
82
  location_id int(11) NOT NULL,
83
  calculated int(1),
84
  namedplace_id int(11) 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 int(11) NOT NULL AUTO_INCREMENT,
......
307 323
      ON UPDATE CASCADE ON DELETE CASCADE
308 324
);
309 325

  
326
CREATE TABLE stratum
327
(
328
  stratum_id int(11) NOT NULL AUTO_INCREMENT,
329
  locationevent_id int(11) NOT NULL,
330
  stratumtype_id int(11) NOT NULL,
331
  stratummethod_id int(11),
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 int(11) NOT NULL AUTO_INCREMENT,

Also available in: Unified diff