Mercurial > dive4elements > river
comparison flys-backend/doc/schema/oracle-spatial.sql @ 5535:16afd4613f9d
Fix syntax errors in oracle scheme
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 03 Apr 2013 15:31:31 +0200 |
parents | 4c4fed23693f |
children | 5f91881124ba |
comparison
equal
deleted
inserted
replaced
5534:a11c6f680487 | 5535:16afd4613f9d |
---|---|
335 CREATE TABLE hydr_boundaries ( | 335 CREATE TABLE hydr_boundaries ( |
336 OGR_FID NUMBER(38), | 336 OGR_FID NUMBER(38), |
337 GEOM MDSYS.SDO_GEOMETRY, | 337 GEOM MDSYS.SDO_GEOMETRY, |
338 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, | 338 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, |
339 name VARCHAR(255), | 339 name VARCHAR(255), |
340 kind NUMBER(38) REFERENCES boundary_kinds(id) NOT NULL DEFAULT 0, | 340 kind NUMBER(38) DEFAULT 0 NOT NULL REFERENCES boundary_kinds(id), |
341 sectie NUMBER(38) REFERENCES sectie_kinds(id) NOT NULL DEFAULT 0, | 341 sectie NUMBER(38) DEFAULT 0 NOT NULL REFERENCES sectie_kinds(id), |
342 sobek NUMBER(38) REFERENCES sobek_kinds(id) NOT NULL DEFAULT 0, | 342 sobek NUMBER(38) DEFAULT 0 NOT NULL REFERENCES sobek_kinds(id), |
343 path VARCHAR(256), | 343 path VARCHAR(256), |
344 id NUMBER PRIMARY KEY NOT NULL | 344 id NUMBER PRIMARY KEY NOT NULL |
345 ); | 345 ); |
346 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); | 346 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); |
347 CREATE OR REPLACE TRIGGER hydr_boundaries_trigger BEFORE INSERT ON hydr_boundaries FOR each ROW | 347 CREATE OR REPLACE TRIGGER hydr_boundaries_trigger BEFORE INSERT ON hydr_boundaries FOR each ROW |
354 CREATE TABLE hydr_boundaries_poly ( | 354 CREATE TABLE hydr_boundaries_poly ( |
355 OGR_FID NUMBER(38), | 355 OGR_FID NUMBER(38), |
356 GEOM MDSYS.SDO_GEOMETRY, | 356 GEOM MDSYS.SDO_GEOMETRY, |
357 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, | 357 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, |
358 name VARCHAR(255), | 358 name VARCHAR(255), |
359 kind NUMBER(38) REFERENCES boundary_kinds(id) NOT NULL DEFAULT 0, | 359 kind NUMBER(38) DEFAULT 0 NOT NULL REFERENCES boundary_kinds(id), |
360 sectie NUMBER(38) REFERENCES sectie_kinds(id) NOT NULL DEFAULT 0, | 360 sectie NUMBER(38) DEFAULT 0 NOT NULL REFERENCES sectie_kinds(id), |
361 sobek NUMBER(38) REFERENCES sobek_kinds(id) NOT NULL DEFAULT 0, | 361 sobek NUMBER(38) DEFAULT 0 NOT NULL REFERENCES sobek_kinds(id), |
362 path VARCHAR(256), | 362 path VARCHAR(256), |
363 id NUMBER PRIMARY KEY NOT NULL | 363 id NUMBER PRIMARY KEY NOT NULL |
364 ); | 364 ); |
365 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); | 365 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); |
366 CREATE OR REPLACE TRIGGER hydr_boundaries_poly_trigger BEFORE INSERT ON hydr_boundaries_poly FOR each ROW | 366 CREATE OR REPLACE TRIGGER hydr_boundaries_poly_trigger BEFORE INSERT ON hydr_boundaries_poly FOR each ROW |