Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql.sql @ 758:bf16268629d9
Added 'Kanten' model
flys-backend/trunk@2106 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 14 Jun 2011 12:34:08 +0000 |
parents | a29fd0916803 |
children | 8076f6a689d0 |
comparison
equal
deleted
inserted
replaced
757:c19d4c643526 | 758:bf16268629d9 |
---|---|
34 CREATE TABLE positions ( | 34 CREATE TABLE positions ( |
35 id int PRIMARY KEY NOT NULL, | 35 id int PRIMARY KEY NOT NULL, |
36 value VARCHAR(256) NOT NULL UNIQUE | 36 value VARCHAR(256) NOT NULL UNIQUE |
37 ); | 37 ); |
38 | 38 |
39 -- Kante 'oben', 'unten' | |
40 CREATE SEQUENCE EDGES_ID_SEQ; | |
41 | |
42 CREATE TABLE edges ( | |
43 id int PRIMARY KEY NOT NULL, | |
44 top NUMERIC, | |
45 bottom NUMERIC | |
46 ); | |
47 | |
39 -- Some object (eg. Hafen) at a segment of river | 48 -- Some object (eg. Hafen) at a segment of river |
40 -- plus its position. | 49 -- plus its position. |
41 CREATE SEQUENCE ANNOTATIONS_ID_SEQ; | 50 CREATE SEQUENCE ANNOTATIONS_ID_SEQ; |
42 | 51 |
43 CREATE TABLE annotations ( | 52 CREATE TABLE annotations ( |
44 id int PRIMARY KEY NOT NULL, | 53 id int PRIMARY KEY NOT NULL, |
45 range_id int NOT NULL REFERENCES ranges(id), | 54 range_id int NOT NULL REFERENCES ranges(id), |
46 attribute_id int NOT NULL REFERENCES attributes(id), | 55 attribute_id int NOT NULL REFERENCES attributes(id), |
47 position_id int REFERENCES positions(id) | 56 position_id int REFERENCES positions(id), |
57 edge_id int REFERENCES edges(id) | |
48 ); | 58 ); |
49 | 59 |
50 -- Pegel | 60 -- Pegel |
51 CREATE SEQUENCE GAUGES_ID_SEQ; | 61 CREATE SEQUENCE GAUGES_ID_SEQ; |
52 | 62 |