comparison flys-backend/doc/schema/oracle-minfo.sql @ 5406:e88d55d01cf5

SCHEMA CHANGE: additional columns and FK constraint for SQ-relation
author Tom Gottfried <tom@intevation.de>
date Mon, 25 Mar 2013 15:46:21 +0100
parents 6dd354e7abfc
children 6875a9f02097
comparison
equal deleted inserted replaced
5405:5ca06120b918 5406:e88d55d01cf5
319 CREATE SEQUENCE SQ_RELATION_VALUES_ID_SEQ; 319 CREATE SEQUENCE SQ_RELATION_VALUES_ID_SEQ;
320 320
321 CREATE TABLE sq_relation_value ( 321 CREATE TABLE sq_relation_value (
322 id NUMBER(38,0) NOT NULL, 322 id NUMBER(38,0) NOT NULL,
323 sq_relation_id NUMBER(38,0) NOT NULL, 323 sq_relation_id NUMBER(38,0) NOT NULL,
324 m_station_id NUMBER(38,0) NOT NULL,
324 parameter VARCHAR(16) NOT NULL, 325 parameter VARCHAR(16) NOT NULL,
325 fraction VARCHAR(32) NOT NULL, 326 fraction VARCHAR(32) NOT NULL,
326 function VARCHAR(32) NOT NULL, 327 a NUMBER(38,20) NOT NULL,
327 km NUMBER(38,3) NOT NULL, 328 b NUMBER(38,20) NOT NULL,
328 a NUMBER(38, 3) NOT NULL, 329 q_max NUMBER(38,20),
329 b NUMBER(38,3) NOT NULL, 330 r_sq NUMBER(38,3),
330 PRIMARY KEY (id), 331 n_tot NUMBER(38,0),
331 CONSTRAINT fk_sqr_id FOREIGN KEY (sq_relation_id) REFERENCES sq_relation(id) 332 n_outl NUMBER(38,0),
332 ); 333 cferguson NUMBER(38,20),
334 cduan NUMBER(38,20),
335 PRIMARY KEY (id),
336 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)
338 );

http://dive4elements.wald.intevation.org