Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
IN-SOURCE
FWE ADE
Commits
f623444b
Commit
f623444b
authored
Jan 10, 2021
by
Rushikesh Padsala
Browse files
Updated DDLs for FWE ADE
parent
9d0e04a0
Pipeline
#1758
passed with stage
in 6 seconds
Changes
28
Pipelines
1
Show whitespace changes
Inline
Side-by-side
public/FWEArea/v2.1/DDL/3dcitydb/oracle/CREATE_ADE_DB.sql
0 → 100644
View file @
f623444b
-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-01-10 14:56:23
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create tables **************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_areasurvey
(
id
INTEGER
NOT
NULL
,
buildingfootrpintarea
NUMBER
,
buildingfootrpintarea_uom
VARCHAR2
(
1000
),
fwearea_consistsoffwesurv_id
INTEGER
,
objectclass_id
INTEGER
,
openplotarea
NUMBER
,
openplotarea_uom
VARCHAR2
(
1000
),
population
INTEGER
,
settlementarea
NUMBER
,
settlementarea_uom
VARCHAR2
(
1000
),
surfacearea
NUMBER
,
surfacearea_uom
VARCHAR2
(
1000
),
surveydescription
VARCHAR2
(
1000
),
surveyyear
INTEGER
,
surveyyearversion
NUMBER
,
trafficarea
NUMBER
,
trafficarea_uom
VARCHAR2
(
1000
),
vegetationarea
NUMBER
,
vegetationarea_uom
VARCHAR2
(
1000
),
waterbodyarea
NUMBER
,
waterbodyarea_uom
VARCHAR2
(
1000
),
PRIMARY
KEY
(
id
)
);
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_energysurvey
(
id
INTEGER
NOT
NULL
,
areasurvey_energysurvey_id
INTEGER
,
biomasselectricitypotential
NUMBER
,
biomasselectricitypotentialu
VARCHAR2
(
1000
),
biomassprimaryenergypotent_1
VARCHAR2
(
1000
),
biomassprimaryenergypotentia
NUMBER
,
biomassthermalpotential
NUMBER
,
biomassthermalpotentialunit
VARCHAR2
(
1000
),
electricitypotentialfrompv_1
VARCHAR2
(
1000
),
electricitypotentialfrompvbu
NUMBER
,
residentialelectricitydema_1
VARCHAR2
(
1000
),
residentialelectricitydemand
NUMBER
,
spacecoolingdemand
NUMBER
,
spacecoolingdemandunit
VARCHAR2
(
1000
),
spaceheatingdemand
NUMBER
,
spaceheatingdemandunit
VARCHAR2
(
1000
),
PRIMARY
KEY
(
id
)
);
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_foodsurvey
(
id
INTEGER
NOT
NULL
,
areasurvey_foodsurvey_id
INTEGER
,
foodcategory
VARCHAR2
(
1000
),
foodcategory_codespace
VARCHAR2
(
1000
),
foodconsumption
NUMBER
,
foodconsumptionunit
VARCHAR2
(
1000
),
fooddemand
NUMBER
,
fooddemandunit
VARCHAR2
(
1000
),
foodproduction
NUMBER
,
foodproductionenergydemand
NUMBER
,
foodproductionenergydemandun
VARCHAR2
(
1000
),
foodproductionunit
VARCHAR2
(
1000
),
foodproductionwaterdemand
NUMBER
,
foodproductionwaterdemanduni
VARCHAR2
(
1000
),
PRIMARY
KEY
(
id
)
);
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_fwearea
(
id
INTEGER
NOT
NULL
,
fweareaname
VARCHAR2
(
1000
),
fwesystemname
VARCHAR2
(
1000
),
lod0multisurface_id
INTEGER
,
PRIMARY
KEY
(
id
)
);
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_watersurvey
(
id
INTEGER
NOT
NULL
,
areasurvey_watersurvey_id
INTEGER
,
domestichotwaterdemand
NUMBER
,
domestichotwaterdemandunit
VARCHAR2
(
1000
),
domesticsolidwaste
NUMBER
,
domesticsolidwasteunit
VARCHAR2
(
1000
),
domesticwaterdemand
NUMBER
,
domesticwaterdemandunit
VARCHAR2
(
1000
),
domesticwaterwaste
NUMBER
,
domesticwaterwasteunit
VARCHAR2
(
1000
),
totaldomesticwaste
NUMBER
,
totaldomesticwasteenergypo_1
VARCHAR2
(
1000
),
totaldomesticwasteenergypote
NUMBER
,
totaldomesticwasteunit
VARCHAR2
(
1000
),
PRIMARY
KEY
(
id
)
);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create foreign keys ********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_areasurvey
ADD
CONSTRAINT
FWEA_areasurvey_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
FWEA_areasurvey
ADD
CONSTRAINT
FWEA_areasurve_objectcl_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
FWEA_areasurvey
ADD
CONSTRAINT
FWEA_areasu_fwear_consi_fk
FOREIGN
KEY
(
fwearea_consistsoffwesurv_id
)
REFERENCES
FWEA_fwearea
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_energysurvey
ADD
CONSTRAINT
FWEA_energysurvey_fk
FOREIGN
KEY
(
id
)
REFERENCES
FWEA_areasurvey
(
id
);
ALTER
TABLE
FWEA_energysurvey
ADD
CONSTRAINT
FWEA_energy_areas_energ_fk
FOREIGN
KEY
(
areasurvey_energysurvey_id
)
REFERENCES
FWEA_areasurvey
(
id
);
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_foodsurvey
ADD
CONSTRAINT
FWEA_foodsurvey_fk
FOREIGN
KEY
(
id
)
REFERENCES
FWEA_areasurvey
(
id
);
ALTER
TABLE
FWEA_foodsurvey
ADD
CONSTRAINT
FWEA_foodsu_areas_foods_fk
FOREIGN
KEY
(
areasurvey_foodsurvey_id
)
REFERENCES
FWEA_areasurvey
(
id
);
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_fwearea
ADD
CONSTRAINT
FWEA_fwearea_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
FWEA_fwearea
ADD
CONSTRAINT
FWEA_fwearea_lod0multis_fk
FOREIGN
KEY
(
lod0multisurface_id
)
REFERENCES
surface_geometry
(
id
);
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_watersurvey
ADD
CONSTRAINT
FWEA_watersurvey_fk
FOREIGN
KEY
(
id
)
REFERENCES
FWEA_areasurvey
(
id
);
ALTER
TABLE
FWEA_watersurvey
ADD
CONSTRAINT
FWEA_waters_areas_water_fk
FOREIGN
KEY
(
areasurvey_watersurvey_id
)
REFERENCES
FWEA_areasurvey
(
id
);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create Indexes *************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_areas_fwear_consi_fkx
ON
FWEA_areasurvey
(
fwearea_consistsoffwesurv_id
);
CREATE
INDEX
FWEA_areasurv_objectcl_fkx
ON
FWEA_areasurvey
(
objectclass_id
);
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_energ_areas_energ_fkx
ON
FWEA_energysurvey
(
areasurvey_energysurvey_id
);
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_foods_areas_foods_fkx
ON
FWEA_foodsurvey
(
areasurvey_foodsurvey_id
);
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_fwearea_lod0multi_fkx
ON
FWEA_fwearea
(
lod0multisurface_id
);
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_water_areas_water_fkx
ON
FWEA_watersurvey
(
areasurvey_watersurvey_id
);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create Sequences ***********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
public/FWEArea/v2.1/DDL/3dcitydb/oracle/DISABLE_ADE_VERSIONING.sql
0 → 100644
View file @
f623444b
-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-01-10 14:56:23
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Disable Versioning *********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
exec
DBMS_WM
.
DisableVersioning
(
'FWEA_areasurvey,FWEA_energysurvey,FWEA_foodsurvey,FWEA_fwearea,FWEA_watersurvey,'
,
true
,
true
);
public/FWEArea/v2.1/DDL/3dcitydb/oracle/DROP_ADE_DB.sql
0 → 100644
View file @
f623444b
-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-01-10 14:56:23
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop foreign keys **********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_areasurvey
DROP
CONSTRAINT
FWEA_areasurvey_fk
;
ALTER
TABLE
FWEA_areasurvey
DROP
CONSTRAINT
FWEA_areasurve_objectcl_fk
;
ALTER
TABLE
FWEA_areasurvey
DROP
CONSTRAINT
FWEA_areasu_fwear_consi_fk
;
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_energysurvey
DROP
CONSTRAINT
FWEA_energysurvey_fk
;
ALTER
TABLE
FWEA_energysurvey
DROP
CONSTRAINT
FWEA_energy_areas_energ_fk
;
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_foodsurvey
DROP
CONSTRAINT
FWEA_foodsurvey_fk
;
ALTER
TABLE
FWEA_foodsurvey
DROP
CONSTRAINT
FWEA_foodsu_areas_foods_fk
;
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_fwearea
DROP
CONSTRAINT
FWEA_fwearea_fk
;
ALTER
TABLE
FWEA_fwearea
DROP
CONSTRAINT
FWEA_fwearea_lod0multis_fk
;
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_watersurvey
DROP
CONSTRAINT
FWEA_watersurvey_fk
;
ALTER
TABLE
FWEA_watersurvey
DROP
CONSTRAINT
FWEA_waters_areas_water_fk
;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop tables ***************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
DROP
TABLE
FWEA_areasurvey
;
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
DROP
TABLE
FWEA_energysurvey
;
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
DROP
TABLE
FWEA_foodsurvey
;
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
DROP
TABLE
FWEA_fwearea
;
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
DROP
TABLE
FWEA_watersurvey
;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop Sequences *************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PURGE
RECYCLEBIN
;
public/FWEArea/v2.1/DDL/3dcitydb/oracle/ENABLE_ADE_VERSIONING.sql
0 → 100644
View file @
f623444b
-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-01-10 14:56:23
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Enable Versioning **********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
exec
DBMS_WM
.
EnableVersioning
(
'FWEA_areasurvey,FWEA_energysurvey,FWEA_foodsurvey,FWEA_fwearea,FWEA_watersurvey,'
,
'VIEW_WO_OVERWRITE'
);
public/FWEArea/v2.1/DDL/3dcitydb/postgreSQL/CREATE_ADE_DB.sql
0 → 100644
View file @
f623444b
-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-01-10 14:56:23
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create tables **************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_areasurvey
(
id
INTEGER
NOT
NULL
,
buildingfootrpintarea
NUMERIC
,
buildingfootrpintarea_uom
VARCHAR
(
1000
),
fwearea_consistsoffwesurv_id
INTEGER
,
objectclass_id
INTEGER
,
openplotarea
NUMERIC
,
openplotarea_uom
VARCHAR
(
1000
),
population
INTEGER
,
settlementarea
NUMERIC
,
settlementarea_uom
VARCHAR
(
1000
),
surfacearea
NUMERIC
,
surfacearea_uom
VARCHAR
(
1000
),
surveydescription
VARCHAR
(
1000
),
surveyyear
INTEGER
,
surveyyearversion
NUMERIC
,
trafficarea
NUMERIC
,
trafficarea_uom
VARCHAR
(
1000
),
vegetationarea
NUMERIC
,
vegetationarea_uom
VARCHAR
(
1000
),
waterbodyarea
NUMERIC
,
waterbodyarea_uom
VARCHAR
(
1000
),
PRIMARY
KEY
(
id
)
);
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_energysurvey
(
id
INTEGER
NOT
NULL
,
areasurvey_energysurvey_id
INTEGER
,
biomasselectricitypotential
NUMERIC
,
biomasselectricitypotentialu
VARCHAR
(
1000
),
biomassprimaryenergypotent_1
VARCHAR
(
1000
),
biomassprimaryenergypotentia
NUMERIC
,
biomassthermalpotential
NUMERIC
,
biomassthermalpotentialunit
VARCHAR
(
1000
),
electricitypotentialfrompv_1
VARCHAR
(
1000
),
electricitypotentialfrompvbu
NUMERIC
,
residentialelectricitydema_1
VARCHAR
(
1000
),
residentialelectricitydemand
NUMERIC
,
spacecoolingdemand
NUMERIC
,
spacecoolingdemandunit
VARCHAR
(
1000
),
spaceheatingdemand
NUMERIC
,
spaceheatingdemandunit
VARCHAR
(
1000
),
PRIMARY
KEY
(
id
)
);
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_foodsurvey
(
id
INTEGER
NOT
NULL
,
areasurvey_foodsurvey_id
INTEGER
,
foodcategory
VARCHAR
(
1000
),
foodcategory_codespace
VARCHAR
(
1000
),
foodconsumption
NUMERIC
,
foodconsumptionunit
VARCHAR
(
1000
),
fooddemand
NUMERIC
,
fooddemandunit
VARCHAR
(
1000
),
foodproduction
NUMERIC
,
foodproductionenergydemand
NUMERIC
,
foodproductionenergydemandun
VARCHAR
(
1000
),
foodproductionunit
VARCHAR
(
1000
),
foodproductionwaterdemand
NUMERIC
,
foodproductionwaterdemanduni
VARCHAR
(
1000
),
PRIMARY
KEY
(
id
)
);
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_fwearea
(
id
INTEGER
NOT
NULL
,
fweareaname
VARCHAR
(
1000
),
fwesystemname
VARCHAR
(
1000
),
lod0multisurface_id
INTEGER
,
PRIMARY
KEY
(
id
)
);
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
CREATE
TABLE
FWEA_watersurvey
(
id
INTEGER
NOT
NULL
,
areasurvey_watersurvey_id
INTEGER
,
domestichotwaterdemand
NUMERIC
,
domestichotwaterdemandunit
VARCHAR
(
1000
),
domesticsolidwaste
NUMERIC
,
domesticsolidwasteunit
VARCHAR
(
1000
),
domesticwaterdemand
NUMERIC
,
domesticwaterdemandunit
VARCHAR
(
1000
),
domesticwaterwaste
NUMERIC
,
domesticwaterwasteunit
VARCHAR
(
1000
),
totaldomesticwaste
NUMERIC
,
totaldomesticwasteenergypo_1
VARCHAR
(
1000
),
totaldomesticwasteenergypote
NUMERIC
,
totaldomesticwasteunit
VARCHAR
(
1000
),
PRIMARY
KEY
(
id
)
);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create foreign keys ********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_areasurvey
ADD
CONSTRAINT
FWEA_areasurvey_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
FWEA_areasurvey
ADD
CONSTRAINT
FWEA_areasurve_objectcl_fk
FOREIGN
KEY
(
objectclass_id
)
REFERENCES
objectclass
(
id
);
ALTER
TABLE
FWEA_areasurvey
ADD
CONSTRAINT
FWEA_areasu_fwear_consi_fk
FOREIGN
KEY
(
fwearea_consistsoffwesurv_id
)
REFERENCES
FWEA_fwearea
(
id
)
ON
DELETE
SET
NULL
;
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_energysurvey
ADD
CONSTRAINT
FWEA_energysurvey_fk
FOREIGN
KEY
(
id
)
REFERENCES
FWEA_areasurvey
(
id
);
ALTER
TABLE
FWEA_energysurvey
ADD
CONSTRAINT
FWEA_energy_areas_energ_fk
FOREIGN
KEY
(
areasurvey_energysurvey_id
)
REFERENCES
FWEA_areasurvey
(
id
);
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_foodsurvey
ADD
CONSTRAINT
FWEA_foodsurvey_fk
FOREIGN
KEY
(
id
)
REFERENCES
FWEA_areasurvey
(
id
);
ALTER
TABLE
FWEA_foodsurvey
ADD
CONSTRAINT
FWEA_foodsu_areas_foods_fk
FOREIGN
KEY
(
areasurvey_foodsurvey_id
)
REFERENCES
FWEA_areasurvey
(
id
);
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_fwearea
ADD
CONSTRAINT
FWEA_fwearea_fk
FOREIGN
KEY
(
id
)
REFERENCES
cityobject
(
id
);
ALTER
TABLE
FWEA_fwearea
ADD
CONSTRAINT
FWEA_fwearea_lod0multis_fk
FOREIGN
KEY
(
lod0multisurface_id
)
REFERENCES
surface_geometry
(
id
);
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_watersurvey
ADD
CONSTRAINT
FWEA_watersurvey_fk
FOREIGN
KEY
(
id
)
REFERENCES
FWEA_areasurvey
(
id
);
ALTER
TABLE
FWEA_watersurvey
ADD
CONSTRAINT
FWEA_waters_areas_water_fk
FOREIGN
KEY
(
areasurvey_watersurvey_id
)
REFERENCES
FWEA_areasurvey
(
id
);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create Indexes *************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_areas_fwear_consi_fkx
ON
FWEA_areasurvey
USING
btree
(
fwearea_consistsoffwesurv_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
CREATE
INDEX
FWEA_areasurv_objectcl_fkx
ON
FWEA_areasurvey
USING
btree
(
objectclass_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_energ_areas_energ_fkx
ON
FWEA_energysurvey
USING
btree
(
areasurvey_energysurvey_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_foods_areas_foods_fkx
ON
FWEA_foodsurvey
USING
btree
(
areasurvey_foodsurvey_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_fwearea_lod0multi_fkx
ON
FWEA_fwearea
USING
btree
(
lod0multisurface_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
CREATE
INDEX
FWEA_water_areas_water_fkx
ON
FWEA_watersurvey
USING
btree
(
areasurvey_watersurvey_id
ASC
NULLS
LAST
)
WITH
(
FILLFACTOR
=
90
);
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Create Sequences ***********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
public/FWEArea/v2.1/DDL/3dcitydb/postgreSQL/DROP_ADE_DB.sql
0 → 100644
View file @
f623444b
-- This document was automatically created by the ADE-Manager tool of 3DCityDB (https://www.3dcitydb.org) on 2021-01-10 14:56:23
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop foreign keys **********************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_areasurvey
DROP
CONSTRAINT
FWEA_areasurvey_fk
;
ALTER
TABLE
FWEA_areasurvey
DROP
CONSTRAINT
FWEA_areasurve_objectcl_fk
;
ALTER
TABLE
FWEA_areasurvey
DROP
CONSTRAINT
FWEA_areasu_fwear_consi_fk
;
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_energysurvey
DROP
CONSTRAINT
FWEA_energysurvey_fk
;
ALTER
TABLE
FWEA_energysurvey
DROP
CONSTRAINT
FWEA_energy_areas_energ_fk
;
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_foodsurvey
DROP
CONSTRAINT
FWEA_foodsurvey_fk
;
ALTER
TABLE
FWEA_foodsurvey
DROP
CONSTRAINT
FWEA_foodsu_areas_foods_fk
;
-- --------------------------------------------------------------------
-- FWEA_fwearea
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_fwearea
DROP
CONSTRAINT
FWEA_fwearea_fk
;
ALTER
TABLE
FWEA_fwearea
DROP
CONSTRAINT
FWEA_fwearea_lod0multis_fk
;
-- --------------------------------------------------------------------
-- FWEA_watersurvey
-- --------------------------------------------------------------------
ALTER
TABLE
FWEA_watersurvey
DROP
CONSTRAINT
FWEA_watersurvey_fk
;
ALTER
TABLE
FWEA_watersurvey
DROP
CONSTRAINT
FWEA_waters_areas_water_fk
;
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- *********************************** Drop tables ***************************************
-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- --------------------------------------------------------------------
-- FWEA_areasurvey
-- --------------------------------------------------------------------
DROP
TABLE
FWEA_areasurvey
;
-- --------------------------------------------------------------------
-- FWEA_energysurvey
-- --------------------------------------------------------------------
DROP
TABLE
FWEA_energysurvey
;
-- --------------------------------------------------------------------
-- FWEA_foodsurvey
-- ----------------------------------------