Mercurial > dive4elements > river
comparison backend/doc/schema/oracle-spatial.sql @ 6632:97145ec4e33c double-precision
Schema changes: fixed typos, syntax errors and missing or obsolete statements in Oracle schema
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 22 Jul 2013 18:06:23 +0200 |
parents | 6a63456b99d9 |
children | dcc7a6c8b92c |
comparison
equal
deleted
inserted
replaced
6631:9aa1c946b87d | 6632:97145ec4e33c |
---|---|
1 WHENEVER SQLERROR EXIT; | 1 --WHENEVER SQLERROR EXIT; |
2 | 2 |
3 CREATE TABLE axis_kinds( | 3 CREATE TABLE axis_kinds( |
4 id NUMBER PRIMARY KEY NOT NULL, | 4 id NUMBER PRIMARY KEY NOT NULL, |
5 name VARCHAR(64) | 5 name VARCHAR(64) |
6 ); | 6 ); |
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 DEFAULT 0, | 17 kind_id NUMBER(38) DEFAULT 0 NOT NULL REFERENCES axis_kinds(id), |
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); |
60 CREATE SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ; | 60 CREATE SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ; |
61 CREATE TABLE cross_section_tracks ( | 61 CREATE TABLE cross_section_tracks ( |
62 OGR_FID NUMBER(38), | 62 OGR_FID NUMBER(38), |
63 GEOM MDSYS.SDO_GEOMETRY, | 63 GEOM MDSYS.SDO_GEOMETRY, |
64 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, | 64 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, |
65 kind_id NUMBER(38) REFERENCES cross_section_track_kinds(id) NOT NULL DEFAULT 0, | 65 kind_id NUMBER(38) DEFAULT 0 NOT NULL REFERENCES cross_section_track_kinds(id), |
66 km NUMBER(38,12) NOT NULL, | 66 km NUMBER(38,12) NOT NULL, |
67 z NUMBER(38,12) DEFAULT 0 NOT NULL, | 67 z NUMBER(38,12) DEFAULT 0 NOT NULL, |
68 name VARCHAR(64), | 68 name VARCHAR(64), |
69 path VARCHAR(256), | 69 path VARCHAR(256), |
70 ID NUMBER PRIMARY KEY NOT NULL | 70 ID NUMBER PRIMARY KEY NOT NULL |
143 CREATE SEQUENCE FLOODPLAIN_ID_SEQ; | 143 CREATE SEQUENCE FLOODPLAIN_ID_SEQ; |
144 CREATE TABLE floodplain( | 144 CREATE TABLE floodplain( |
145 OGR_FID NUMBER(38), | 145 OGR_FID NUMBER(38), |
146 GEOM MDSYS.SDO_GEOMETRY, | 146 GEOM MDSYS.SDO_GEOMETRY, |
147 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, | 147 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, |
148 kind_id NUMBER(38) REFERENCES floodplain_kinds(id) NOT NULL DEFAULT 0, | 148 kind_id NUMBER(38) DEFAULT 0 NOT NULL REFERENCES floodplain_kinds(id), |
149 name VARCHAR(64), | 149 name VARCHAR(64), |
150 path VARCHAR(256), | 150 path VARCHAR(256), |
151 ID NUMBER PRIMARY KEY NOT NULL | 151 ID NUMBER PRIMARY KEY NOT NULL |
152 ); | 152 ); |
153 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('floodplain', '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); | 153 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('floodplain', '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); |