diff flys-backend/doc/schema/oracle-minfo.sql @ 2829:4074777afcfa

Added MINFO specific relations for flow velocity measurements. flys-backend/trunk@4246 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 17 Apr 2012 10:16:21 +0000
parents ac13e466a55e
children 5b54a648f702
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle-minfo.sql	Tue Apr 17 09:37:52 2012 +0000
+++ b/flys-backend/doc/schema/oracle-minfo.sql	Tue Apr 17 10:16:21 2012 +0000
@@ -213,14 +213,27 @@
 
 
 
---CREATE SEQUENCE
---
---CREATE TABLE flow_velocity_measurements (
---
---);
---
---CREATE SEQUENCE
---
---CREATE TABLE flow_velocity_measurements_values (
---
---);
+CREATE SEQUENCE FV_MEASURE_ID_SEQ;
+
+CREATE TABLE flow_velocity_measurements (
+    id          NUMBER(38,0) NOT NULL,
+    river_id    NUMBER(38,0) NOT NULL,
+    description VARCHAR(256),
+    PRIMARY KEY (id),
+    CONSTRAINT fk_fvm_rivers_id FOREIGN KEY (river_id) REFERENCES rivers(id)
+);
+
+CREATE SEQUENCE FV_MEASURE_VALUES_ID_SEQ;
+
+CREATE TABLE flow_velocity_measure_values (
+    id              NUMBER(38,0) NOT NULL,
+    measurements_id NUMBER(38,0) NOT NULL,
+    station         NUMBER(38,3) NOT NULL,
+    datetime        TIMESTAMP,
+    w               NUMBER(38,3) NOT NULL,
+    q               NUMBER(38,3) NOT NULL,
+    v               NUMBER(38,3) NOT NULL,
+    description     VARCHAR(256),
+    PRIMARY KEY (id),
+    CONSTRAINT fk_fvmv_measurements_id FOREIGN KEY (measurements_id) REFERENCES flow_velocity_measurements (id)
+);

http://dive4elements.wald.intevation.org