comparison flys-backend/doc/schema/oracle-spatial.sql @ 5078:0fd7720e5c7f dami

Oracle Schema, add overlooked sectie and sobek fields
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 21 Feb 2013 12:36:30 +0100
parents 57a845da72bd
children c4b28de753de
comparison
equal deleted inserted replaced
5077:c5187ab9f571 5078:0fd7720e5c7f
292 CREATE TABLE hydr_boundaries ( 292 CREATE TABLE hydr_boundaries (
293 OGR_FID NUMBER(38), 293 OGR_FID NUMBER(38),
294 GEOM MDSYS.SDO_GEOMETRY, 294 GEOM MDSYS.SDO_GEOMETRY,
295 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, 295 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
296 name VARCHAR(255), 296 name VARCHAR(255),
297 kind NUMBER(38), 297 kind NUMBER(38) REFERENCES boundary_kinds(id),
298 sectie NUMBER(38) REFERENCES sectie_kinds(id),
299 sobek NUMBER(38) REFERENCES sobek_kinds(id),
298 path VARCHAR(256), 300 path VARCHAR(256),
299 id NUMBER PRIMARY KEY NOT NULL 301 id NUMBER PRIMARY KEY NOT NULL
300 ); 302 );
301 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hydr_boundaries', '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); 303 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hydr_boundaries', '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);
302 CREATE OR REPLACE TRIGGER hydr_boundaries_trigger BEFORE INSERT ON hydr_boundaries FOR each ROW 304 CREATE OR REPLACE TRIGGER hydr_boundaries_trigger BEFORE INSERT ON hydr_boundaries FOR each ROW
309 CREATE TABLE hydr_boundaries_poly ( 311 CREATE TABLE hydr_boundaries_poly (
310 OGR_FID NUMBER(38), 312 OGR_FID NUMBER(38),
311 GEOM MDSYS.SDO_GEOMETRY, 313 GEOM MDSYS.SDO_GEOMETRY,
312 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, 314 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE,
313 name VARCHAR(255), 315 name VARCHAR(255),
314 kind NUMBER(38), 316 kind NUMBER(38) REFERENCES boundary_kinds(id),
317 sectie NUMBER(38) REFERENCES sectie_kinds(id),
318 sobek NUMBER(38) REFERENCES sobek_kinds(id),
315 path VARCHAR(256), 319 path VARCHAR(256),
316 id NUMBER PRIMARY KEY NOT NULL 320 id NUMBER PRIMARY KEY NOT NULL
317 ); 321 );
318 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hydr_boundaries_poly', '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); 322 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hydr_boundaries_poly', '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);
319 CREATE OR REPLACE TRIGGER hydr_boundaries_poly_trigger BEFORE INSERT ON hydr_boundaries_poly FOR each ROW 323 CREATE OR REPLACE TRIGGER hydr_boundaries_poly_trigger BEFORE INSERT ON hydr_boundaries_poly FOR each ROW

http://dive4elements.wald.intevation.org