comparison flys-backend/doc/schema/oracle-minfo.sql @ 5452:5287440b57b3

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 27 Mar 2013 11:48:53 +0100
parents b279f2d4bc78
children 303701ab73c6
comparison
equal deleted inserted replaced
5451:278d8759c92b 5452:5287440b57b3
38 CREATE SEQUENCE BED_HEIGHT_SINGLE_ID_SEQ; 38 CREATE SEQUENCE BED_HEIGHT_SINGLE_ID_SEQ;
39 39
40 CREATE TABLE bed_height_single ( 40 CREATE TABLE bed_height_single (
41 id NUMBER(38,0) NOT NULL, 41 id NUMBER(38,0) NOT NULL,
42 river_id NUMBER(38,0) NOT NULL, 42 river_id NUMBER(38,0) NOT NULL,
43 year NUMBER(38,0) NOT NULL, 43 year NUMBER(38,0),
44 sounding_width NUMBER(38,0) NOT NULL, 44 sounding_width NUMBER(38,0),
45 type_id NUMBER(38,0) NOT NULL, 45 type_id NUMBER(38,0) NOT NULL,
46 location_system_id NUMBER(38,0) NOT NULL, 46 location_system_id NUMBER(38,0) NOT NULL,
47 cur_elevation_model_id NUMBER(38,0) NOT NULL, 47 cur_elevation_model_id NUMBER(38,0) NOT NULL,
48 old_elevation_model_id NUMBER(38,0), 48 old_elevation_model_id NUMBER(38,0),
49 range_id NUMBER(38,0) NOT NULL, 49 range_id NUMBER(38,0),
50 evaluation_by VARCHAR(255), 50 evaluation_by VARCHAR(255),
51 description VARCHAR(255), 51 description VARCHAR(255),
52 PRIMARY KEY(id), 52 PRIMARY KEY(id),
53 CONSTRAINT fk_bed_single_river_id FOREIGN KEY (river_id) REFERENCES rivers(id), 53 CONSTRAINT fk_bed_single_river_id FOREIGN KEY (river_id) REFERENCES rivers(id),
54 CONSTRAINT fk_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id), 54 CONSTRAINT fk_type FOREIGN KEY (type_id) REFERENCES bed_height_type(id),
67 time_interval_id NUMBER(38,0) NOT NULL, 67 time_interval_id NUMBER(38,0) NOT NULL,
68 -- sounding_with NUMBER(38,0) NOT NULL, 68 -- sounding_with NUMBER(38,0) NOT NULL,
69 -- type_id NUMBER(38,0) NOT NULL, 69 -- type_id NUMBER(38,0) NOT NULL,
70 cur_elevation_model_id NUMBER(38,0) NOT NULL, 70 cur_elevation_model_id NUMBER(38,0) NOT NULL,
71 old_elevation_model_id NUMBER(38,0), 71 old_elevation_model_id NUMBER(38,0),
72 range_id NUMBER(38,0) NOT NULL, 72 range_id NUMBER(38,0),
73 evaluation_by VARCHAR(255), 73 evaluation_by VARCHAR(255),
74 description VARCHAR(255), 74 description VARCHAR(255),
75 PRIMARY KEY(id), 75 PRIMARY KEY(id),
76 CONSTRAINT fk_time_interval FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id), 76 CONSTRAINT fk_time_interval FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id),
77 CONSTRAINT fk_epoch_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id), 77 CONSTRAINT fk_epoch_cur_elevation_model FOREIGN KEY (cur_elevation_model_id) REFERENCES elevation_model(id),
112 112
113 CREATE TABLE depths ( 113 CREATE TABLE depths (
114 id NUMBER(38,0) NOT NULL, 114 id NUMBER(38,0) NOT NULL,
115 lower NUMBER(38,2) NOT NULL, 115 lower NUMBER(38,2) NOT NULL,
116 upper NUMBER(38,2) NOT NULL, 116 upper NUMBER(38,2) NOT NULL,
117 unit_id NUMBER(38,0) NOT NULL, 117 PRIMARY KEY(id)
118 PRIMARY KEY(id),
119 CONSTRAINT fk_depths_unit_id FOREIGN KEY (unit_id) REFERENCES units(id)
120 ); 118 );
121 119
122 120
123 CREATE SEQUENCE SEDIMENT_DENSITY_ID_SEQ; 121 CREATE SEQUENCE SEDIMENT_DENSITY_ID_SEQ;
124 122
125 CREATE TABLE sediment_density ( 123 CREATE TABLE sediment_density (
126 id NUMBER(38,0) NOT NULL, 124 id NUMBER(38,0) NOT NULL,
127 river_id NUMBER(38,0) NOT NULL, 125 river_id NUMBER(38,0) NOT NULL,
128 depth_id NUMBER(38,0) NOT NULL, 126 depth_id NUMBER(38,0) NOT NULL,
129 unit_id NUMBER(38,0) NOT NULL,
130 description VARCHAR(256), 127 description VARCHAR(256),
131 PRIMARY KEY(id), 128 PRIMARY KEY(id),
132 CONSTRAINT fk_sd_river_id FOREIGN KEY (river_id) REFERENCES rivers(id), 129 CONSTRAINT fk_sd_river_id FOREIGN KEY (river_id) REFERENCES rivers(id),
133 CONSTRAINT fk_sd_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id), 130 CONSTRAINT fk_sd_depth_id FOREIGN KEY (depth_id) REFERENCES depths(id)
134 CONSTRAINT fk_sd_unit_id FOREIGN KEY (unit_id) REFERENCES units(id)
135 ); 131 );
136 132
137 133
138 CREATE SEQUENCE SEDIMENT_DENSITY_VALUES_ID_SEQ; 134 CREATE SEQUENCE SEDIMENT_DENSITY_VALUES_ID_SEQ;
139 135
285 CREATE TABLE measurement_station ( 281 CREATE TABLE measurement_station (
286 id NUMBER(38) NOT NULL, 282 id NUMBER(38) NOT NULL,
287 name VARCHAR(256) NOT NULL, 283 name VARCHAR(256) NOT NULL,
288 river_id NUMBER(38) NOT NULL, 284 river_id NUMBER(38) NOT NULL,
289 station NUMBER(38,3) NOT NULL, 285 station NUMBER(38,3) NOT NULL,
290 range_id NUMBER(38) NOT NULL, 286 range_id NUMBER(38),
291 measurement_type VARCHAR(64) NOT NULL, 287 measurement_type VARCHAR(64) NOT NULL,
292 riverside VARCHAR(16), 288 riverside VARCHAR(16),
293 reference_gauge_id NUMBER(38), 289 reference_gauge_id NUMBER(38),
294 observation_timerange_id NUMBER(38), 290 observation_timerange_id NUMBER(38),
295 operator VARCHAR(64), 291 operator VARCHAR(64),
320 316
321 CREATE TABLE sq_relation_value ( 317 CREATE TABLE sq_relation_value (
322 id NUMBER(38,0) NOT NULL, 318 id NUMBER(38,0) NOT NULL,
323 sq_relation_id NUMBER(38,0) NOT NULL, 319 sq_relation_id NUMBER(38,0) NOT NULL,
324 measurement_station_id NUMBER(38,0) NOT NULL, 320 measurement_station_id NUMBER(38,0) NOT NULL,
325 parameter VARCHAR(16) NOT NULL,
326 fraction VARCHAR(32) NOT NULL, 321 fraction VARCHAR(32) NOT NULL,
327 a NUMBER(38,20) NOT NULL, 322 a NUMBER(38,20) NOT NULL,
328 b NUMBER(38,20) NOT NULL, 323 b NUMBER(38,20) NOT NULL,
329 qmax NUMBER(38,20), 324 qmax NUMBER(38,20),
330 rsq NUMBER(38,3), 325 rsq NUMBER(38,3),
332 noutl NUMBER(38,0), 327 noutl NUMBER(38,0),
333 cferguson NUMBER(38,20), 328 cferguson NUMBER(38,20),
334 cduan NUMBER(38,20), 329 cduan NUMBER(38,20),
335 PRIMARY KEY (id), 330 PRIMARY KEY (id),
336 CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id), 331 CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id),
337 CONSTRAINT fk_mstation_id FOREIGN KEY (m_station_id) REFERENCES measurement_station(id) 332 CONSTRAINT fk_mstation_id FOREIGN KEY (measurement_station_id) REFERENCES measurement_station(id)
338 ); 333 );

http://dive4elements.wald.intevation.org