comparison flys-backend/doc/schema/oracle-spatial.sql @ 2335:e1fb4a1e0b4a

Generalized oracle spatial schema. flys-backend/trunk@2794 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Schilberg <bjoern@intevation.de>
date Tue, 20 Sep 2011 13:21:29 +0000
parents a75e7d922942
children e69ef36290ae
comparison
equal deleted inserted replaced
2334:8a3dbb705ebf 2335:e1fb4a1e0b4a
4 CREATE TABLE catchment( 4 CREATE TABLE catchment(
5 OGR_FID NUMBER(38), 5 OGR_FID NUMBER(38),
6 GEOM MDSYS.SDO_GEOMETRY, 6 GEOM MDSYS.SDO_GEOMETRY,
7 river_id NUMBER(38), 7 river_id NUMBER(38),
8 area NUMBER(19,5), 8 area NUMBER(19,5),
9 name VARCHAR2(80), 9 name VARCHAR2(255),
10 ID NUMBER PRIMARY KEY NOT NULL 10 ID NUMBER PRIMARY KEY NOT NULL
11 ); 11 );
12 --EXTENT 2520667.897954 5376316.575645 2634771.191263 5508288.005707 12 --EXTENT 2520667.897954 5376316.575645 2634771.191263 5508288.005707
13 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('CATCHMENT', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2520667.894954166,2634771.194263435,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5376316.572645214,5508288.008706546,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 13 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('CATCHMENT', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2520667.894954166,2634771.194263435,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5376316.572645214,5508288.008706546,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466);
14 14
43 CREATE SEQUENCE BUILDINGS_ID_SEQ; 43 CREATE SEQUENCE BUILDINGS_ID_SEQ;
44 CREATE TABLE buildings( 44 CREATE TABLE buildings(
45 OGR_FID NUMBER(38), 45 OGR_FID NUMBER(38),
46 GEOM MDSYS.SDO_GEOMETRY, 46 GEOM MDSYS.SDO_GEOMETRY,
47 river_id NUMBER(38), 47 river_id NUMBER(38),
48 name VARCHAR2(50), 48 name VARCHAR2(255),
49 ID NUMBER PRIMARY KEY NOT NULL 49 ID NUMBER PRIMARY KEY NOT NULL
50 ); 50 );
51 --Extent: (2540544.253718, 5456266.217464) - (2567747.834199, 5502557.982120) 51 --Extent: (2540544.253718, 5456266.217464) - (2567747.834199, 5502557.982120)
52 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('buildings', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2540544.253718,2567747.834199,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5456266.217464,5502557.982120,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 52 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('buildings', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2540544.253718,2567747.834199,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5456266.217464,5502557.982120,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466);
53 CREATE OR REPLACE TRIGGER buildings_trigger BEFORE INSERT ON buildings FOR each ROW 53 CREATE OR REPLACE TRIGGER buildings_trigger BEFORE INSERT ON buildings FOR each ROW
62 CREATE SEQUENCE FIXPOINTS_ID_SEQ; 62 CREATE SEQUENCE FIXPOINTS_ID_SEQ;
63 CREATE TABLE fixpoints ( 63 CREATE TABLE fixpoints (
64 OGR_FID NUMBER(38), 64 OGR_FID NUMBER(38),
65 GEOM MDSYS.SDO_GEOMETRY, 65 GEOM MDSYS.SDO_GEOMETRY,
66 river_id NUMBER(38), 66 river_id NUMBER(38),
67 x NUMBER(19,11), 67 x NUMBER(38,11),
68 y NUMBER(19,11), 68 y NUMBER(38,11),
69 km NUMBER(10) NOT NULL, 69 km NUMBER(38,11) NOT NULL,
70 HPGP VARCHAR2(254), 70 HPGP VARCHAR2(255),
71 ID NUMBER PRIMARY KEY NOT NULL 71 ID NUMBER PRIMARY KEY NOT NULL
72 ); 72 );
73 --Extent: (2539388.036000, 5450896.688000) - (2575586.296000, 5507370.606000) 73 --Extent: (2539388.036000, 5450896.688000) - (2575586.296000, 5507370.606000)
74 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('fixpoints', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539388.036000,2575586.296000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450896.688000,5507370.606000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 74 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('fixpoints', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539388.036000,2575586.296000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450896.688000,5507370.606000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466);
75 CREATE OR REPLACE TRIGGER fixpoints_trigger BEFORE INSERT ON fixpoints FOR each ROW 75 CREATE OR REPLACE TRIGGER fixpoints_trigger BEFORE INSERT ON fixpoints FOR each ROW
103 CREATE SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ; 103 CREATE SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ;
104 CREATE TABLE cross_section_tracks ( 104 CREATE TABLE cross_section_tracks (
105 OGR_FID NUMBER(38), 105 OGR_FID NUMBER(38),
106 GEOM MDSYS.SDO_GEOMETRY, 106 GEOM MDSYS.SDO_GEOMETRY,
107 river_id NUMBER(38), 107 river_id NUMBER(38),
108 km NUMBER(14,12) NOT NULL, 108 km NUMBER(38,12) NOT NULL,
109 z NUMBER(18,5) DEFAULT 0 NOT NULL, 109 z NUMBER(18,5) DEFAULT 0 NOT NULL,
110 ID NUMBER PRIMARY KEY NOT NULL 110 ID NUMBER PRIMARY KEY NOT NULL
111 ); 111 );
112 --Extent: (2539289.724000, 5450852.896743) - (2576589.878311, 5507289.656000) 112 --Extent: (2539289.724000, 5450852.896743) - (2576589.878311, 5507289.656000)
113 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('cross_section_tracks', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539289.724000,2576589.878311,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450852.896743,5507289.656000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 113 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('cross_section_tracks', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539289.724000,2576589.878311,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450852.896743,5507289.656000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466);
123 CREATE SEQUENCE HWS_ID_SEQ; 123 CREATE SEQUENCE HWS_ID_SEQ;
124 CREATE TABLE hws( 124 CREATE TABLE hws(
125 OGR_FID NUMBER(38), 125 OGR_FID NUMBER(38),
126 GEOM MDSYS.SDO_GEOMETRY, 126 GEOM MDSYS.SDO_GEOMETRY,
127 river_id NUMBER(38), 127 river_id NUMBER(38),
128 hws_facility VARCHAR2(40), 128 hws_facility VARCHAR2(255),
129 type VARCHAR2(254), 129 type VARCHAR2(255),
130 ID NUMBER PRIMARY KEY NOT NULL 130 ID NUMBER PRIMARY KEY NOT NULL
131 ); 131 );
132 --Extent: (2539778.101933, 5456638.161347) - (2567463.841704, 5500605.745332) 132 --Extent: (2539778.101933, 5456638.161347) - (2567463.841704, 5500605.745332)
133 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hws', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539778.101933,2567463.841704,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5456638.161347,5500605.745332,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); 133 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hws', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539778.101933,2567463.841704,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5456638.161347,5500605.745332,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466);
134 CREATE OR REPLACE TRIGGER hws_trigger BEFORE INSERT ON hws FOR each ROW 134 CREATE OR REPLACE TRIGGER hws_trigger BEFORE INSERT ON hws FOR each ROW

http://dive4elements.wald.intevation.org