Mercurial > dive4elements > river
comparison flys-backend/doc/schema/oracle-minfo.sql @ 3321:a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
flys-backend/trunk@4622 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 07 Jun 2012 09:52:44 +0000 |
parents | c36106f15ac9 |
children | cc8fc6b29649 |
comparison
equal
deleted
inserted
replaced
3320:8f905390c10d | 3321:a2a33eff93aa |
---|---|
349 value NUMBER(38,2) NOT NULL, | 349 value NUMBER(38,2) NOT NULL, |
350 PRIMARY KEY (id), | 350 PRIMARY KEY (id), |
351 CONSTRAINT fk_wdv_column_id FOREIGN KEY (column_id) REFERENCES waterlevel_difference_column (id) | 351 CONSTRAINT fk_wdv_column_id FOREIGN KEY (column_id) REFERENCES waterlevel_difference_column (id) |
352 ); | 352 ); |
353 | 353 |
354 | |
355 CREATE SEQUENCE SQ_RELATION_ID_SEQ; | |
356 | |
357 CREATE TABLE sq_relation ( | |
358 id NUMBER(38,0) NOT NULL, | |
359 time_interval_id NUMBER(38,0) NOT NULL, | |
360 description VARCHAR(256), | |
361 PRIMARY KEY (id), | |
362 CONSTRAINT fk_sqr_tinterval_id FOREIGN KEY (time_interval_id) REFERENCES time_intervals(id) | |
363 ); | |
364 | |
365 | |
366 CREATE SEQUENCE SQ_RELATION_VALUES_ID_SEQ; | |
367 | |
368 CREATE TABLE sq_relation_value ( | |
369 id NUMBER(38,0) NOT NULL, | |
370 sq_relation_id NUMBER(38,0) NOT NULL, | |
371 parameter VARCHAR(16) NOT NULL, | |
372 fraction VARCHAR(32) NOT NULL, | |
373 function VARCHAR(32) NOT NULL, | |
374 km NUMBER(38,3) NOT NULL, | |
375 a NUMBER NOT NULL, | |
376 b NUMBER(38,3) NOT NULL, | |
377 PRIMARY KEY (id), | |
378 CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) | |
379 ); |