Mercurial > dive4elements > river
comparison flys-backend/doc/schema/oracle-spatial.sql @ 5205:31fd42400c84
Oracle Schema: add missing constraint and allow 7-digit kms
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 08 Mar 2013 13:06:40 +0100 |
parents | 94c3eb995bf6 |
children | 908848b74d7e |
comparison
equal
deleted
inserted
replaced
5204:20f9b633900e | 5205:31fd42400c84 |
---|---|
12 CREATE SEQUENCE RIVER_AXES_ID_SEQ; | 12 CREATE SEQUENCE RIVER_AXES_ID_SEQ; |
13 CREATE TABLE river_axes( | 13 CREATE TABLE river_axes( |
14 OGR_FID NUMBER(38), | 14 OGR_FID NUMBER(38), |
15 GEOM MDSYS.SDO_GEOMETRY, | 15 GEOM MDSYS.SDO_GEOMETRY, |
16 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, | 16 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, |
17 kind_id NUMBER(38) REFERENCES axis_kinds(id) NOT NULL, | 17 kind_id NUMBER(38) REFERENCES axis_kinds(id) NOT NULL DEFAULT 0, |
18 name VARCHAR(64), | 18 name VARCHAR(64), |
19 path VARCHAR(256), | 19 path VARCHAR(256), |
20 ID NUMBER PRIMARY KEY NOT NULL | 20 ID NUMBER PRIMARY KEY NOT NULL |
21 ); | 21 ); |
22 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',3282450,3912240,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5248260,6100130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467); | 22 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',3282450,3912240,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5248260,6100130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467); |
32 CREATE SEQUENCE RIVER_AXES_KM_ID_SEQ; | 32 CREATE SEQUENCE RIVER_AXES_KM_ID_SEQ; |
33 CREATE TABLE river_axes_km( | 33 CREATE TABLE river_axes_km( |
34 OGR_FID NUMBER(38), | 34 OGR_FID NUMBER(38), |
35 GEOM MDSYS.SDO_GEOMETRY, | 35 GEOM MDSYS.SDO_GEOMETRY, |
36 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, | 36 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, |
37 km NUMBER(6,3), | 37 km NUMBER(7,3), |
38 name VARCHAR(64), | 38 name VARCHAR(64), |
39 path VARCHAR(256), | 39 path VARCHAR(256), |
40 ID NUMBER PRIMARY KEY NOT NULL | 40 ID NUMBER PRIMARY KEY NOT NULL |
41 ); | 41 ); |
42 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes_km', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',3282450,3912240,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5248260,6100130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467); | 42 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes_km', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',3282450,3912240,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5248260,6100130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467); |