comparison flys-backend/doc/schema/oracle-minfo.sql @ 2807:5ac1db5156be

Some oracle db schema adaptions specific to bed heights in MINFO. flys-backend/trunk@4215 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 11 Apr 2012 13:09:46 +0000
parents a55b7b35cc3a
children f283212966e8
comparison
equal deleted inserted replaced
2806:33f40b23edd8 2807:5ac1db5156be
34 CREATE SEQUENCE BED_HEIGHT_SINGLE_ID_SEQ; 34 CREATE SEQUENCE BED_HEIGHT_SINGLE_ID_SEQ;
35 35
36 CREATE TABLE bed_height_single ( 36 CREATE TABLE bed_height_single (
37 id NUMBER(38,0) NOT NULL, 37 id NUMBER(38,0) NOT NULL,
38 year NUMBER(38,0) NOT NULL, 38 year NUMBER(38,0) NOT NULL,
39 sounding_with NUMBER(38,0) NOT NULL, 39 sounding_width NUMBER(38,0) NOT NULL,
40 type_id NUMBER(38,0) NOT NULL, 40 type_id NUMBER(38,0) NOT NULL,
41 location_system_id NUMBER(38,0) NOT NULL,
41 cur_elevation_model_id NUMBER(38,0) NOT NULL, 42 cur_elevation_model_id NUMBER(38,0) NOT NULL,
42 old_elevation_model_id NUMBER(38,0), 43 old_elevation_model_id NUMBER(38,0),
43 range_id NUMBER(38,0) NOT NULL, 44 range_id NUMBER(38,0) NOT NULL,
44 evaluation_by VARCHAR(255), 45 evaluation_by VARCHAR(255),
45 description VARCHAR(255), 46 description VARCHAR(255),
46 PRIMARY KEY(id), 47 PRIMARY KEY(id),
47 CONSTRAINT fk_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id), 48 CONSTRAINT fk_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id),
49 CONSTRAINT fk_location_system FOREIGN KEY (location_system_id) REFERENCES location_system(id),
48 CONSTRAINT fk_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id), 50 CONSTRAINT fk_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id),
49 CONSTRAINT fk_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id), 51 CONSTRAINT fk_old_elevation_model FOREIGN KEY (old_elevation_model_id) REFERENCES elevation_model(id),
50 CONSTRAINT fk_range FOREIGN KEY (range_id) REFERENCES ranges(id) 52 CONSTRAINT fk_range FOREIGN KEY (range_id) REFERENCES ranges(id)
51 ); 53 );
52 54
78 bed_height_single_id NUMBER(38,0) NOT NULL, 80 bed_height_single_id NUMBER(38,0) NOT NULL,
79 station NUMBER(38,2) NOT NULL, 81 station NUMBER(38,2) NOT NULL,
80 height NUMBER(38,2), 82 height NUMBER(38,2),
81 uncertainty NUMBER(38,2), 83 uncertainty NUMBER(38,2),
82 data_gap NUMBER(38,2) NOT NULL, 84 data_gap NUMBER(38,2) NOT NULL,
85 sounding_width NUMBER(38,2) NOT NULL,
83 width NUMBER(38,2) NOT NULL, 86 width NUMBER(38,2) NOT NULL,
84 PRIMARY KEY(id), 87 PRIMARY KEY(id),
85 CONSTRAINT fk_bed_single_values_parent FOREIGN KEY (bed_height_single_id) REFERENCES bed_height_single(id) 88 CONSTRAINT fk_bed_single_values_parent FOREIGN KEY (bed_height_single_id) REFERENCES bed_height_single(id)
86 ); 89 );
87 90

http://dive4elements.wald.intevation.org