comparison wamos.sql @ 54:285146e8c9c5

Align constraints with WSDL (NOT NULL vs. minOccurs).
author Tom Gottfried <tom@intevation.de>
date Wed, 23 May 2018 11:36:47 +0200
parents 6e8d571c720e
children ecb9bb0591c9
comparison
equal deleted inserted replaced
53:6e8d571c720e 54:285146e8c9c5
85 -- (which would mean a model differing a bit from RIS-Index ideas) 85 -- (which would mean a model differing a bit from RIS-Index ideas)
86 ); 86 );
87 87
88 CREATE TABLE bottlenecks ( 88 CREATE TABLE bottlenecks (
89 bottleneck_id varchar PRIMARY KEY, 89 bottleneck_id varchar PRIMARY KEY,
90 fk_g_fid isrs REFERENCES gauges, 90 fk_g_fid isrs NOT NULL REFERENCES gauges,
91 -- XXX: DRC references "ch. 3.1.1", which does not exist in document. 91 -- XXX: DRC references "ch. 3.1.1", which does not exist in document.
92 objnam varchar UNIQUE NOT NULL, 92 objnam varchar,
93 nobjnm varchar UNIQUE, 93 nobjnm varchar,
94 stretch isrsrange NOT NULL, 94 stretch isrsrange NOT NULL,
95 area geometry(POLYGON, 3146) NOT NULL, 95 area geometry(POLYGON, 3146) NOT NULL,
96 rb char(2) NOT NULL REFERENCES countries, -- from rb_lb in interface 96 rb char(2) NOT NULL REFERENCES countries, -- from rb_lb in interface
97 lb char(2) NOT NULL REFERENCES countries, -- from rb_lb in interface 97 lb char(2) NOT NULL REFERENCES countries, -- from rb_lb in interface
98 responsible_country char(2) NOT NULL REFERENCES countries, 98 responsible_country char(2) NOT NULL REFERENCES countries,
99 revisiting_time smallint NOT NULL, 99 revisiting_time smallint NOT NULL,
100 limiting varchar NOT NULL REFERENCES limiting_factors, 100 limiting varchar NOT NULL REFERENCES limiting_factors,
101 surtyp varchar NOT NULL REFERENCES survey_types, 101 surtyp varchar NOT NULL REFERENCES survey_types,
102 -- XXX: Also an attribut of sounding result? 102 -- XXX: Also an attribut of sounding result?
103 coverage varchar NOT NULL REFERENCES coverage_types, 103 coverage varchar REFERENCES coverage_types,
104 -- XXX: Also an attribut of sounding result? 104 -- XXX: Also an attribut of sounding result?
105 -- CHECK allowed combinations of surtyp and coverage or 105 -- CHECK allowed combinations of surtyp and coverage or
106 -- different model approach? 106 -- different model approach?
107 depth_reference char(3) NOT NULL REFERENCES depth_references, 107 depth_reference char(3) NOT NULL REFERENCES depth_references,
108 -- XXX: Also an attribut of sounding result? 108 -- XXX: Also an attribut of sounding result?
124 bottleneck_id varchar NOT NULL REFERENCES bottlenecks, 124 bottleneck_id varchar NOT NULL REFERENCES bottlenecks,
125 date_info date NOT NULL, 125 date_info date NOT NULL,
126 PRIMARY KEY (bottleneck_id, date_info), 126 PRIMARY KEY (bottleneck_id, date_info),
127 area geometry(POLYGON, 3146) NOT NULL, 127 area geometry(POLYGON, 3146) NOT NULL,
128 surtyp varchar NOT NULL REFERENCES survey_types, 128 surtyp varchar NOT NULL REFERENCES survey_types,
129 coverage varchar NOT NULL REFERENCES coverage_types, 129 coverage varchar REFERENCES coverage_types,
130 depth_reference char(3) NOT NULL REFERENCES depth_references, 130 depth_reference char(3) NOT NULL REFERENCES depth_references,
131 sounding_data raster NOT NULL 131 sounding_data raster NOT NULL
132 ); 132 );
133 133
134 COMMIT; 134 COMMIT;