comparison backend/doc/schema/oracle-spatial.sql @ 7352:c6825778de1f

Merged double-precision branch.
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 16 Oct 2013 13:03:13 +0200
parents dcc7a6c8b92c
children cc53aae06303
comparison
equal deleted inserted replaced
7350:760ea7f08455 7352:c6825778de1f
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);
163 CREATE SEQUENCE DEM_ID_SEQ; 163 CREATE SEQUENCE DEM_ID_SEQ;
164 CREATE TABLE dem ( 164 CREATE TABLE dem (
165 ID NUMBER PRIMARY KEY NOT NULL, 165 ID NUMBER PRIMARY KEY NOT NULL,
166 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, 166 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
167 name VARCHAR(64), 167 name VARCHAR(64),
168 range_id NUMBER(38) REFERENCES ranges(id), 168 range_id NUMBER(38) REFERENCES ranges(id) ON DELETE CASCADE,
169 time_interval_id NUMBER(38) REFERENCES time_intervals(id), 169 time_interval_id NUMBER(38) REFERENCES time_intervals(id),
170 projection VARCHAR(32), 170 projection VARCHAR(32),
171 elevation_state VARCHAR(32), 171 elevation_state VARCHAR(32),
172 srid NUMBER NOT NULL, 172 srid NUMBER NOT NULL,
173 format VARCHAR(32), 173 format VARCHAR(32),

http://dive4elements.wald.intevation.org