comparison flys-backend/doc/schema/oracle-spatial.sql @ 2369:a3c02addd1fa

doc/schema/oracle-spatial.sql: Adjusted extent to the extent of germany and srs to 31467 in USER_SDO_GEOM_METADATA. flys-backend/trunk@3337 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Schilberg <bjoern@intevation.de>
date Wed, 30 Nov 2011 11:23:23 +0000
parents 60532f75396b
children 7d378970d764
comparison
equal deleted inserted replaced
2368:ce4c7045afc1 2369:a3c02addd1fa
5 GEOM MDSYS.SDO_GEOMETRY, 5 GEOM MDSYS.SDO_GEOMETRY,
6 river_id NUMBER(38), 6 river_id NUMBER(38),
7 kind NUMBER(38) DEFAULT 0 NOT NULL, 7 kind NUMBER(38) DEFAULT 0 NOT NULL,
8 ID NUMBER PRIMARY KEY NOT NULL 8 ID NUMBER PRIMARY KEY NOT NULL
9 ); 9 );
10 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 10 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
11 CREATE OR REPLACE TRIGGER river_axes_trigger BEFORE INSERT ON river_axes FOR each ROW 11 CREATE OR REPLACE TRIGGER river_axes_trigger BEFORE INSERT ON river_axes FOR each ROW
12 BEGIN 12 BEGIN
13 SELECT RIVER_AXES_ID_SEQ.nextval INTO :new.id FROM dual; 13 SELECT RIVER_AXES_ID_SEQ.nextval INTO :new.id FROM dual;
14 END; 14 END;
15 / 15 /
23 GEOM MDSYS.SDO_GEOMETRY, 23 GEOM MDSYS.SDO_GEOMETRY,
24 river_id NUMBER(38), 24 river_id NUMBER(38),
25 km NUMBER(6,3), 25 km NUMBER(6,3),
26 ID NUMBER PRIMARY KEY NOT NULL 26 ID NUMBER PRIMARY KEY NOT NULL
27 ); 27 );
28 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes_km', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 28 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes_km', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
29 CREATE OR REPLACE TRIGGER river_axes_km_trigger BEFORE INSERT ON river_axes_km FOR each ROW 29 CREATE OR REPLACE TRIGGER river_axes_km_trigger BEFORE INSERT ON river_axes_km FOR each ROW
30 BEGIN 30 BEGIN
31 SELECT river_axes_km_ID_SEQ.nextval INTO :new.id FROM dual; 31 SELECT river_axes_km_ID_SEQ.nextval INTO :new.id FROM dual;
32 END; 32 END;
33 / 33 /
42 river_id NUMBER(38), 42 river_id NUMBER(38),
43 km NUMBER(38,12) NOT NULL, 43 km NUMBER(38,12) NOT NULL,
44 z NUMBER(38,12) DEFAULT 0 NOT NULL, 44 z NUMBER(38,12) DEFAULT 0 NOT NULL,
45 ID NUMBER PRIMARY KEY NOT NULL 45 ID NUMBER PRIMARY KEY NOT NULL
46 ); 46 );
47 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('cross_section_tracks', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 47 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('cross_section_tracks', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
48 CREATE OR REPLACE TRIGGER cross_section_tracks_trigger BEFORE INSERT ON cross_section_tracks FOR each ROW 48 CREATE OR REPLACE TRIGGER cross_section_tracks_trigger BEFORE INSERT ON cross_section_tracks FOR each ROW
49 BEGIN 49 BEGIN
50 SELECT CROSS_SECTION_TRACKS_ID_SEQ.nextval INTO :new.id FROM dual; 50 SELECT CROSS_SECTION_TRACKS_ID_SEQ.nextval INTO :new.id FROM dual;
51 END; 51 END;
52 / 52 /
62 river_id NUMBER(38), 62 river_id NUMBER(38),
63 kind VARCHAR2(16) NOT NULL, 63 kind VARCHAR2(16) NOT NULL,
64 z NUMBER(38,12) DEFAULT 0, 64 z NUMBER(38,12) DEFAULT 0,
65 ID NUMBER PRIMARY KEY NOT NULL 65 ID NUMBER PRIMARY KEY NOT NULL
66 ); 66 );
67 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('lines', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 67 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('lines', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
68 CREATE OR REPLACE TRIGGER lines_trigger BEFORE INSERT ON lines FOR each ROW 68 CREATE OR REPLACE TRIGGER lines_trigger BEFORE INSERT ON lines FOR each ROW
69 BEGIN 69 BEGIN
70 SELECT LINES_ID_SEQ.nextval INTO :new.id FROM dual; 70 SELECT LINES_ID_SEQ.nextval INTO :new.id FROM dual;
71 END; 71 END;
72 / 72 /
85 GEOM MDSYS.SDO_GEOMETRY, 85 GEOM MDSYS.SDO_GEOMETRY,
86 river_id NUMBER(38), 86 river_id NUMBER(38),
87 name VARCHAR2(255), 87 name VARCHAR2(255),
88 ID NUMBER PRIMARY KEY NOT NULL 88 ID NUMBER PRIMARY KEY NOT NULL
89 ); 89 );
90 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('buildings', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 90 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('buildings', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
91 CREATE OR REPLACE TRIGGER buildings_trigger BEFORE INSERT ON buildings FOR each ROW 91 CREATE OR REPLACE TRIGGER buildings_trigger BEFORE INSERT ON buildings FOR each ROW
92 BEGIN 92 BEGIN
93 SELECT BUILDINGS_ID_SEQ.nextval INTO :new.id FROM dual; 93 SELECT BUILDINGS_ID_SEQ.nextval INTO :new.id FROM dual;
94 END; 94 END;
95 / 95 /
106 y NUMBER(38,11), 106 y NUMBER(38,11),
107 km NUMBER(38,11) NOT NULL, 107 km NUMBER(38,11) NOT NULL,
108 HPGP VARCHAR2(255), 108 HPGP VARCHAR2(255),
109 ID NUMBER PRIMARY KEY NOT NULL 109 ID NUMBER PRIMARY KEY NOT NULL
110 ); 110 );
111 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('fixpoints', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 111 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('fixpoints', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
112 CREATE OR REPLACE TRIGGER fixpoints_trigger BEFORE INSERT ON fixpoints FOR each ROW 112 CREATE OR REPLACE TRIGGER fixpoints_trigger BEFORE INSERT ON fixpoints FOR each ROW
113 BEGIN 113 BEGIN
114 SELECT FIXPOINTS_ID_SEQ.nextval INTO :new.id FROM dual; 114 SELECT FIXPOINTS_ID_SEQ.nextval INTO :new.id FROM dual;
115 END; 115 END;
116 / 116 /
123 OGR_FID NUMBER(38), 123 OGR_FID NUMBER(38),
124 GEOM MDSYS.SDO_GEOMETRY, 124 GEOM MDSYS.SDO_GEOMETRY,
125 river_id NUMBER(38), 125 river_id NUMBER(38),
126 ID NUMBER PRIMARY KEY NOT NULL 126 ID NUMBER PRIMARY KEY NOT NULL
127 ); 127 );
128 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('floodplain', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 128 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('floodplain', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
129 CREATE OR REPLACE TRIGGER floodplain_trigger BEFORE INSERT ON floodplain FOR each ROW 129 CREATE OR REPLACE TRIGGER floodplain_trigger BEFORE INSERT ON floodplain FOR each ROW
130 BEGIN 130 BEGIN
131 SELECT FLOODPLAIN_ID_SEQ.nextval INTO :new.id FROM dual; 131 SELECT FLOODPLAIN_ID_SEQ.nextval INTO :new.id FROM dual;
132 END; 132 END;
133 / 133 /
162 river_id NUMBER(38), 162 river_id NUMBER(38),
163 area NUMBER(19,5), 163 area NUMBER(19,5),
164 name VARCHAR2(255), 164 name VARCHAR2(255),
165 ID NUMBER PRIMARY KEY NOT NULL 165 ID NUMBER PRIMARY KEY NOT NULL
166 ); 166 );
167 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('CATCHMENT', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 167 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('CATCHMENT', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
168 168
169 CREATE TRIGGER catchment_trigger BEFORE INSERT ON catchment FOR each ROW 169 CREATE TRIGGER catchment_trigger BEFORE INSERT ON catchment FOR each ROW
170 BEGIN 170 BEGIN
171 SELECT CATCHMENT_ID_SEQ.nextval INTO :new.id FROM dual; 171 SELECT CATCHMENT_ID_SEQ.nextval INTO :new.id FROM dual;
172 END; 172 END;
181 river_id NUMBER(38), 181 river_id NUMBER(38),
182 hws_facility VARCHAR2(255), 182 hws_facility VARCHAR2(255),
183 type VARCHAR2(255), 183 type VARCHAR2(255),
184 ID NUMBER PRIMARY KEY NOT NULL 184 ID NUMBER PRIMARY KEY NOT NULL
185 ); 185 );
186 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hws', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2457864.326387,2634771.191263,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5297459.306295,5586961.449130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 186 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hws', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2500000,5200000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5200000,6100000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467);
187 CREATE OR REPLACE TRIGGER hws_trigger BEFORE INSERT ON hws FOR each ROW 187 CREATE OR REPLACE TRIGGER hws_trigger BEFORE INSERT ON hws FOR each ROW
188 BEGIN 188 BEGIN
189 SELECT HWS_ID_SEQ.nextval INTO :new.id FROM dual; 189 SELECT HWS_ID_SEQ.nextval INTO :new.id FROM dual;
190 END; 190 END;
191 / 191 /

http://dive4elements.wald.intevation.org