-- DROP USER GWBASE;

CREATE USER GWBASE
-- IDENTIFIED BY <password>
;

CREATE TABLE "GWBASE"."GPD_ABWEICHUNGEN" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"AW_BIS" NUMBER(8,2), 
	"AW_NEIGUNG" NUMBER(8,2), 
	"AW_AZIMUT" NUMBER(8,2), 
	"AW_XW" NUMBER(8,2), 
	"AW_YW" NUMBER(8,2), 
	"AW_ZW" NUMBER(8,2), 
	"AW_DATUM" DATE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_ABWEICHUNGEN_PK" ON "GWBASE"."GPD_ABWEICHUNGEN" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_ABWEICHUNGEN" ADD CONSTRAINT "GPD_ABWEICHUNGEN_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_ABWEICHUNGEN_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_ABWEICHUNGEN_PK" ON "GWBASE"."GPD_ABWEICHUNGEN" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_ASBBOHRLOCH" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"ABL_OK" NUMBER(8,2), 
	"ABL_UK" NUMBER(8,2), 
	"ABL_DURCHMESSER" NUMBER(10,0), 
	"ABL_DURCHMZOLL" VARCHAR2(12), 
	"ABL_VERFAHREN" NUMBER(10,0), 
	"ABL_WERKZEUG" NUMBER(10,0), 
	"ABL_NOTIZ" VARCHAR2(254)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_ASBBOHRLOCH_PK" ON "GWBASE"."GPD_ASBBOHRLOCH" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_ASBBOHRLOCH" ADD CONSTRAINT "GPD_ASBBOHRLOCH_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_ASBBOHRLOCH_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_ASBBOHRLOCH" ADD CONSTRAINT "FK_GPD_ASBBOHRLOCH_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_ASBBOHRLOCH_PK" ON "GWBASE"."GPD_ASBBOHRLOCH" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_ASBFILTER" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"AFI_ROHRRECID" NUMBER(10,0) NOT NULL ENABLE, 
	"AFI_SCHLITZWEITE" NUMBER(3,2), 
	"AFI_POS" NUMBER(10,0), 
	"AFI_HYDGEOLEINHEIT" NUMBER(10,0), 
	"AFI_GWLTYP" NUMBER(10,0), 
	"AFI_HYDRAULIK" NUMBER(10,0), 
	"AFI_GWSTOCKWERK" NUMBER(10,0), 
	"AFI_BEMERKUNG" VARCHAR2(255)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_ASBFILTER_PK" ON "GWBASE"."GPD_ASBFILTER" ("MSID", "AFI_ROHRRECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_ASBFILTER" ADD CONSTRAINT "GPD_ASBFILTER_PK" PRIMARY KEY ("MSID", "AFI_ROHRRECID")
  USING INDEX "GWBASE"."GPD_ASBFILTER_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_ASBFILTER" ADD CONSTRAINT "FK_GPD_ASBFILTER_1" FOREIGN KEY ("MSID", "AFI_ROHRRECID")
	  REFERENCES "GWBASE"."GPD_ASBVERROHRUNG" ("MSID", "RECID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_ASBFILTER_PK" ON "GWBASE"."GPD_ASBFILTER" ("MSID", "AFI_ROHRRECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_ASBSONDERBAU" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"ASE_OK" NUMBER(8,2), 
	"ASE_UK" NUMBER(8,2), 
	"ASE_TYP" NUMBER(10,0), 
	"ASE_DURCHMESSER" NUMBER(10,0), 
	"ASE_DURCHMZOLL" VARCHAR2(12), 
	"ASE_WANDSTAERKE" NUMBER(4,1), 
	"ASE_BEMERKUNG" VARCHAR2(80), 
	"ASE_LINEWIDTH" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_ASBSONDERBAU_PK" ON "GWBASE"."GPD_ASBSONDERBAU" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_ASBSONDERBAU" ADD CONSTRAINT "GPD_ASBSONDERBAU_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_ASBSONDERBAU_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_ASBSONDERBAU" ADD CONSTRAINT "FK_GPD_ASBSONDERBAU_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_ASBSONDERBAU_PK" ON "GWBASE"."GPD_ASBSONDERBAU" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_ASBVERFUELLUNG" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"AVF_MATERIAL" NUMBER(10,0), 
	"AVF_OK" NUMBER(8,2), 
	"AVF_UK" NUMBER(8,2), 
	"AVF_DURCHMESSER" NUMBER(10,0), 
	"AVF_DURCHMZOLL" VARCHAR2(12), 
	"AVF_KORNGROESSEMIN" NUMBER(4,1), 
	"AVF_KORNGROESSEMAX" NUMBER(4,1), 
	"AVF_BEMERKUNG" VARCHAR2(80), 
	"AVF_TEILVERFUELLUNG" VARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_ASBVERFUELLUNG_PK" ON "GWBASE"."GPD_ASBVERFUELLUNG" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_ASBVERFUELLUNG" ADD CONSTRAINT "GPD_ASBVERFUELLUNG_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_ASBVERFUELLUNG_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_ASBVERFUELLUNG" ADD CONSTRAINT "FK_GPD_ASBVERFUELLUNG_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_ASBVERFUELLUNG_PK" ON "GWBASE"."GPD_ASBVERFUELLUNG" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_ASBVERROHRUNG" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"ARO_TOURID" NUMBER(10,0), 
	"ARO_OK" NUMBER(8,2), 
	"ARO_UK" NUMBER(8,2), 
	"ARO_TYP" NUMBER(10,0), 
	"ARO_MATERIAL" NUMBER(10,0), 
	"ARO_DURCHMESSER" NUMBER(10,0), 
	"ARO_DURCHMZOLL" VARCHAR2(12), 
	"ARO_WANDSTAERKE" NUMBER(4,1), 
	"ARO_BEMERKUNG" VARCHAR2(80), 
	"ARO_DISPLAYPOS" NUMBER(10,0), 
	"ARO_IGNOREFILTER" VARCHAR2(1), 
	"ARO_FUERUEBERSICHT" VARCHAR2(1), 
	"ARO_LINEWIDTH" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_ASBVERROHRUNG_PK" ON "GWBASE"."GPD_ASBVERROHRUNG" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_ASBVERROHRUNG" ADD CONSTRAINT "GPD_ASBVERROHRUNG_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_ASBVERROHRUNG_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_ASBVERROHRUNG" ADD CONSTRAINT "FK_GPD_ASBVERROHRUNG_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_ASBVERROHRUNG_PK" ON "GWBASE"."GPD_ASBVERROHRUNG" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_HYDROPARAM" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"GWL" NUMBER(10,0), 
	"T_REP" NUMBER(10,2), 
	"T_SIM" NUMBER(10,2), 
	"KF_SIM" NUMBER(15,12), 
	"S_SIM" NUMBER(10,2), 
	"P_SIM" VARCHAR2(255), 
	"B_SIM" VARCHAR2(255), 
	"PV_LIT" VARCHAR2(50), 
	"T_LIT" NUMBER(10,2), 
	"KF_LIT" NUMBER(15,12), 
	"S_LIT" NUMBER(10,2), 
	"P_LIT" VARCHAR2(255), 
	"DQUELLE" VARCHAR2(255), 
	"WSP_FIS" NUMBER(10,2), 
	"DATUM_FIS" DATE, 
	"KF_FIS" NUMBER(15,12), 
	"T_FIS" NUMBER(10,2), 
	"B_FIS" VARCHAR2(255), 
	"S_FIS" NUMBER(10,2), 
	"E_FIS" NUMBER(10,2), 
	"T_LOGAN" NUMBER(10,2), 
	"E_LOGAN" NUMBER(10,2), 
	"Q_LOG" NUMBER(10,2), 
	"Q_LOG2" NUMBER(10,2), 
	"S_LOG" NUMBER(10,2), 
	"WSP_R_LOG" NUMBER(10,2), 
	"WSP_A_LOG" NUMBER(10,2), 
	"BEHARR_LOG" VARCHAR2(50), 
	"B_LOG" VARCHAR2(255)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_HYDROPARAM_PK" ON "GWBASE"."GPD_HYDROPARAM" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_HYDROPARAM" ADD CONSTRAINT "GPD_HYDROPARAM_PK" PRIMARY KEY ("MSID")
  USING INDEX "GWBASE"."GPD_HYDROPARAM_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_HYDROPARAM" ADD CONSTRAINT "FK_GPD_HYDROPARAM_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_HYDROPARAM_PK" ON "GWBASE"."GPD_HYDROPARAM" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_KLUEFTE" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"KL_ANFANG" NUMBER(10,2), 
	"KL_ENDE" NUMBER(10,2), 
	"KL_NEIGUNG" NUMBER(10,0), 
	"KL_ART" NUMBER(10,0), 
	"KL_BEMERKUNG" VARCHAR2(255)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_KLUEFTE_PK" ON "GWBASE"."GPD_KLUEFTE" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_KLUEFTE" ADD CONSTRAINT "GPD_KLUEFTE_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_KLUEFTE_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_KLUEFTE" ADD CONSTRAINT "FK_GPD_KLUEFTE_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_KLUEFTE_PK" ON "GWBASE"."GPD_KLUEFTE" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_LOG" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"LG_NAME" VARCHAR2(40), 
	"LG_FIRMA" NUMBER(10,0), 
	"LG_DATUM" DATE, 
	"LG_ANFANG" NUMBER(8,2), 
	"LG_ENDE" NUMBER(8,2), 
	"LG_BEZUG" NUMBER(10,0), 
	"LG_NOTITZ" VARCHAR2(254), 
	"LG_ERGEBNIS" VARCHAR2(254), 
	"LG_METHODE" NUMBER(10,0), 
	"LG_UNIT" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_LOG_PK" ON "GWBASE"."GPD_LOG" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_LOG" ADD CONSTRAINT "GPD_LOG_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_LOG_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_LOG" ADD CONSTRAINT "FK_GPD_LOG_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_LOG_PK" ON "GWBASE"."GPD_LOG" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_LOGDATA" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"LD_LOGRECID" NUMBER(10,0) NOT NULL ENABLE, 
	"LD_RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"LD_DATUMZEIT" DATE, 
	"LD_DEPTH" NUMBER(8,2), 
	"LD_VALUE" NUMBER(8,2), 
	"LD_UNIT" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_LOGDATA_PK" ON "GWBASE"."GPD_LOGDATA" ("MSID", "LD_LOGRECID", "LD_RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_LOGDATA" ADD CONSTRAINT "GPD_LOGDATA_PK" PRIMARY KEY ("MSID", "LD_LOGRECID", "LD_RECID")
  USING INDEX "GWBASE"."GPD_LOGDATA_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_LOGDATA" ADD CONSTRAINT "FK_GPD_LOGDATA_1" FOREIGN KEY ("MSID", "LD_LOGRECID")
	  REFERENCES "GWBASE"."GPD_LOG" ("MSID", "RECID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_LOGDATA_PK" ON "GWBASE"."GPD_LOGDATA" ("MSID", "LD_LOGRECID", "LD_RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_MSPASSCONFIG" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"CONFIG" CLOB
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("CONFIG") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_MSPASSCONFIG_PK" ON "GWBASE"."GPD_MSPASSCONFIG" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_MSPASSCONFIG" ADD CONSTRAINT "GPD_MSPASSCONFIG_PK" PRIMARY KEY ("MSID")
  USING INDEX "GWBASE"."GPD_MSPASSCONFIG_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_MSPASSCONFIG" ADD CONSTRAINT "FK_GPD_MSPASSCONFIG_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_MSPASSCONFIG_PK" ON "GWBASE"."GPD_MSPASSCONFIG" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075975C00002$$" ON "GWBASE"."GPD_MSPASSCONFIG" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GPD_MSSTAMM" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"STM_LOCID" NUMBER(10,0), 
	"STM_STATUS" NUMBER(10,0), 
	"STM_VERTRAULICHKEIT" NUMBER(10,0), 
	"STM_BOHRART" NUMBER(10,0), 
	"STM_BOHRVERF" NUMBER(10,0), 
	"STM_BOHRZWECK" NUMBER(10,0), 
	"STM_KOORDFIND" NUMBER(10,0), 
	"STM_KOORDSYS" NUMBER(10,0), 
	"STM_ENDRECHTWERT" NUMBER(8,2), 
	"STM_ENDHOCHWERT" NUMBER(8,2), 
	"STM_BOHRANSATZHOEHE" NUMBER(8,2), 
	"STM_BOHRENDHOEHE" NUMBER(8,2), 
	"STM_HFIND" NUMBER(10,0), 
	"STM_HSYS" NUMBER(10,0), 
	"STM_AKTENZEICHEN" VARCHAR2(64), 
	"STM_ARCHIVFACH" NUMBER(10,0), 
	"STM_ARNUM" NUMBER(10,0), 
	"STM_TIEFBARCHIVNR" NUMBER(10,0), 
	"STM_TK5" NUMBER(10,0), 
	"STM_LAND" NUMBER(10,0), 
	"STM_BUNDESLAND" NUMBER(10,0), 
	"STM_LANDKREIS" NUMBER(10,0), 
	"STM_REGIERUNGSBEZIRK" NUMBER(10,0), 
	"STM_BEHOERDE" NUMBER(10,0), 
	"STM_AUFTRAGGEBER" NUMBER(10,0), 
	"STM_FRMBAUSTELLE" NUMBER(10,0), 
	"STM_FRMBOHRUNG" NUMBER(10,0), 
	"STM_FRMAUSBAU" NUMBER(10,0), 
	"STM_FRMKELLERAUSBAU" NUMBER(10,0), 
	"STM_BETREUENDESBUERO" NUMBER(10,0), 
	"STM_DTMBOHRBEGINN" DATE, 
	"STM_DTMBOHRENDE" DATE, 
	"STM_DTMBOHRPROT" DATE, 
	"STM_DTMDVERFASS" DATE, 
	"STM_DTMANTRAG" DATE, 
	"STM_DTMGENEHMIGUNG" DATE, 
	"STM_DTMBPLATZEINRICHTEN" DATE, 
	"STM_DTMBPLATZRAEUMEN" DATE, 
	"STM_DTMIMPORT" DATE, 
	"STM_BEARBEITERBOHR" NUMBER(10,0), 
	"STM_BEARBEITERGEOL" NUMBER(10,0), 
	"STM_BEARBEITERHYDRO" NUMBER(10,0), 
	"STM_BOHRMEISTER" NUMBER(10,0), 
	"STM_DVERFASSER" VARCHAR2(80), 
	"STM_BAULEITER" NUMBER(10,0), 
	"STM_DATHINW" VARCHAR2(48), 
	"STM_BEMERKUNGEN" VARCHAR2(254), 
	"STM_HYDAUFSCHLUSSNR" NUMBER(10,0), 
	"STM_MSART" NUMBER(10,0), 
	"STM_STRATIGRAFIELISTE" NUMBER(10,0), 
	"STM_PTFILEYN" VARCHAR2(1), 
	"STM_BOHRID" NUMBER(10,0), 
	"STM_OLDWELLID" NUMBER(10,0), 
	"STM_ISSEPIMPORT" VARCHAR2(1), 
	"STM_ISSEP" VARCHAR2(1), 
	"STM_SEPVALID" VARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_MSSTAMM_PK" ON "GWBASE"."GPD_MSSTAMM" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_MSSTAMM" ADD CONSTRAINT "GPD_MSSTAMM_PK" PRIMARY KEY ("MSID")
  USING INDEX "GWBASE"."GPD_MSSTAMM_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_MSSTAMM_PK" ON "GWBASE"."GPD_MSSTAMM" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_MSSYNONYME" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"MSSYN_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MSSYN_SYNID" NUMBER(10,0), 
	"MSSYN_BEZEICHNUNG" VARCHAR2(128)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_MSSYNONYME_PK" ON "GWBASE"."GPD_MSSYNONYME" ("MSID", "MSSYN_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_MSSYNONYME" ADD CONSTRAINT "GPD_MSSYNONYME_PK" PRIMARY KEY ("MSID", "MSSYN_ID")
  USING INDEX "GWBASE"."GPD_MSSYNONYME_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_MSSYNONYME" ADD CONSTRAINT "FK_GPD_MSSYNONYME_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_MSSYNONYME_PK" ON "GWBASE"."GPD_MSSYNONYME" ("MSID", "MSSYN_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_PACKERTEST" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"PT_TESTNR" VARCHAR2(50), 
	"PT_DATUMZEIT" DATE, 
	"PT_ANALYSENANSATZ" VARCHAR2(50), 
	"PT_INTERVALLENDE" NUMBER(8,2), 
	"PT_INTERVALLANFANG" NUMBER(8,2), 
	"PT_STRECKENLAENGE" NUMBER(8,2), 
	"PT_ZONE" NUMBER(10,0), 
	"PT_BEMERKUNG" VARCHAR2(255), 
	"PT_ART_T_KF" NUMBER(10,0), 
	"PT_T" NUMBER(8,2), 
	"PT_T_ZFGOLDER" NUMBER(8,2), 
	"PT_KF" NUMBER(8,2), 
	"PT_S" NUMBER(8,2), 
	"PT_SS" NUMBER(8,2), 
	"PT_ELF" NUMBER(8,2), 
	"PT_PH" NUMBER(8,2), 
	"PT_INTERVALLMITTEGOK" NUMBER(8,2), 
	"PT_ANSATZHOEHE" NUMBER(8,2), 
	"PT_INTERVALLMITTENN" NUMBER(8,2), 
	"PT_STATISCHERGWSPIEGELGOK" NUMBER(8,2), 
	"PT_STATISCHERGWSPIEGELNN" NUMBER(8,2), 
	"PT_PRODUZIERTESVOLUMEN" NUMBER(8,2), 
	"PT_GEOLEINHVON" NUMBER(10,0), 
	"PT_GEOLEINHBIS" NUMBER(10,0), 
	"PT_GEOLEINHIMPORTERR" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_PACKERTEST_PK" ON "GWBASE"."GPD_PACKERTEST" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_PACKERTEST" ADD CONSTRAINT "GPD_PACKERTEST_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_PACKERTEST_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_PACKERTEST" ADD CONSTRAINT "FK_GPD_PACKERTEST_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_PACKERTEST_PK" ON "GWBASE"."GPD_PACKERTEST" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_PLFIRMA" 
   (	"PLF_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PLF_LISTID" NUMBER(10,0), 
	"PLF_NAME1" VARCHAR2(64), 
	"PLF_NAME2" VARCHAR2(64), 
	"PLF_PLZ" VARCHAR2(10), 
	"PLF_ORT" VARCHAR2(64), 
	"PLF_STRASSE" VARCHAR2(64), 
	"PLF_LAND" NUMBER(10,0), 
	"PLF_TELEFON1" VARCHAR2(64), 
	"PLF_TELEFON2" VARCHAR2(64), 
	"PLF_FAX1" VARCHAR2(64), 
	"PLF_FAX2" VARCHAR2(64), 
	"PLF_EMAIL1" VARCHAR2(64), 
	"PLF_EMAIL2" VARCHAR2(64), 
	"PLF_WWW" VARCHAR2(255), 
	"PLF_BEMERKUNG" VARCHAR2(255), 
	"PLF_TYP" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_PLFIRMA_PK" ON "GWBASE"."GPD_PLFIRMA" ("PLF_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_PLFIRMA" ADD CONSTRAINT "GPD_PLFIRMA_PK" PRIMARY KEY ("PLF_ID")
  USING INDEX "GWBASE"."GPD_PLFIRMA_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_PLFIRMA_PK" ON "GWBASE"."GPD_PLFIRMA" ("PLF_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_PLPERSON" 
   (	"PLP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PLP_LISTID" NUMBER(10,0), 
	"PLP_VORNAME" VARCHAR2(64), 
	"PLP_NACHNAME" VARCHAR2(64), 
	"PLP_NAME" VARCHAR2(132)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_PLPERSON_PK" ON "GWBASE"."GPD_PLPERSON" ("PLP_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_PLPERSON" ADD CONSTRAINT "GPD_PLPERSON_PK" PRIMARY KEY ("PLP_ID")
  USING INDEX "GWBASE"."GPD_PLPERSON_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_PLPERSON_PK" ON "GWBASE"."GPD_PLPERSON" ("PLP_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_PLSTANDARD" 
   (	"PLS_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PLS_LISTID" NUMBER(10,0), 
	"PLS_KEYSEP" VARCHAR2(12), 
	"PLS_KEY" VARCHAR2(12), 
	"PLS_NAME" VARCHAR2(255), 
	"PLS_PTTYPEINDEX" NUMBER(10,0), 
	"PLS_FLAG1" NUMBER(10,0), 
	"PLS_LAS" VARCHAR2(12), 
	"PLS_ISSEP" VARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_PLSTANDARD_PK" ON "GWBASE"."GPD_PLSTANDARD" ("PLS_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_PLSTANDARD" ADD CONSTRAINT "GPD_PLSTANDARD_PK" PRIMARY KEY ("PLS_ID")
  USING INDEX "GWBASE"."GPD_PLSTANDARD_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_PLSTANDARD_PK" ON "GWBASE"."GPD_PLSTANDARD" ("PLS_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_PLSTANDARD_TEMP" 
   (	"PLS_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PLS_LISTID" NUMBER(10,0), 
	"PLS_KEYSEP" VARCHAR2(12), 
	"PLS_KEY" VARCHAR2(12), 
	"PLS_NAME" VARCHAR2(255), 
	"PLS_PTTYPEINDEX" NUMBER(10,0), 
	"PLS_FLAG1" NUMBER(10,0), 
	"PLS_LAS" VARCHAR2(12), 
	"PLS_ISSEP" VARCHAR2(1)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_SCHICHTEN" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"SD_LAYERID" NUMBER(10,0) NOT NULL ENABLE, 
	"SD_INTVERSION" NUMBER(10,0) NOT NULL ENABLE, 
	"SD_LAYERCNTR" NUMBER(10,0) NOT NULL ENABLE, 
	"SD_LAYERNO" NUMBER(10,0), 
	"SD_SUBLAYERNO" NUMBER(10,0), 
	"SD_OK" NUMBER(20,4), 
	"SD_UK" NUMBER(20,4), 
	"SD_ART" VARCHAR2(128), 
	"SD_ARTKLAR" CLOB, 
	"SD_STRATIGRAFIE" VARCHAR2(254), 
	"SD_STRATIGRAFIEKRZ" VARCHAR2(64), 
	"SD_STRATIGRAFIEID" NUMBER(10,0), 
	"SD_PETROGRAFIE" VARCHAR2(254), 
	"SD_PETROKLAR" VARCHAR2(255), 
	"SD_GENESE" VARCHAR2(254), 
	"SD_GENESEKLAR" CLOB, 
	"SD_FARBE" VARCHAR2(254), 
	"SD_FARBEKLAR" CLOB, 
	"SD_ZUSATZ" VARCHAR2(254), 
	"SD_ZUSATZKLAR" CLOB, 
	"SD_BEMERKUNG" VARCHAR2(128), 
	"SD_BESCHAFFENHEITBOHRGUT" VARCHAR2(128), 
	"SD_BESCHBGKLAR" CLOB, 
	"SD_BOHRVORGANG" VARCHAR2(128), 
	"SD_BOHRVORGANGKLAR" CLOB, 
	"SD_BODENGRUPPE" VARCHAR2(128), 
	"SD_BODENGRUPPEKLAR" CLOB, 
	"SD_KALKGEHALT" VARCHAR2(128), 
	"SD_KALKGEHALTKLAR" CLOB, 
	"SD_INTGRUPPE" VARCHAR2(12), 
	"SD_INTKLASSE" VARCHAR2(12), 
	"SD_INTNOTITZ" CLOB, 
	"SD_TEXTUR" NUMBER(10,0), 
	"SD_KRISTALLINITAET" NUMBER(10,0), 
	"SD_TRENNFLAECHENFUELLUNG" NUMBER(10,0), 
	"SD_STREICHENFALLEN" VARCHAR2(64), 
	"SD_ERGBEMERKUNG" VARCHAR2(255), 
	"SD_UEBLICHEBEZ" VARCHAR2(64), 
	"SD_GEOLBEZ" VARCHAR2(64), 
	"SD_BODENKLASSE" NUMBER(10,0), 
	"SD_VERWITTERUNG" NUMBER(10,0), 
	"SD_WETZONES" VARCHAR2(64), 
	"SD_FRACTURES" VARCHAR2(64), 
	"SD_SEPERROR" NUMBER(10,0), 
	"SD_SEPPETRO" VARCHAR2(254), 
	"SD_SEPFARBE" VARCHAR2(254), 
	"SD_SEPBESCHBG" VARCHAR2(128), 
	"SD_SEPBESCHBV" VARCHAR2(128), 
	"SD_SEPKALKGEH" VARCHAR2(128)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("SD_ARTKLAR") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("SD_GENESEKLAR") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("SD_FARBEKLAR") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("SD_ZUSATZKLAR") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("SD_BESCHBGKLAR") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("SD_BOHRVORGANGKLAR") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("SD_BODENGRUPPEKLAR") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("SD_KALKGEHALTKLAR") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("SD_INTNOTITZ") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_SCHICHTEN_PK" ON "GWBASE"."GPD_SCHICHTEN" ("MSID", "SD_LAYERID", "SD_INTVERSION", "SD_LAYERCNTR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_SCHICHTEN" ADD CONSTRAINT "GPD_SCHICHTEN_PK" PRIMARY KEY ("MSID", "SD_LAYERID", "SD_INTVERSION", "SD_LAYERCNTR")
  USING INDEX "GWBASE"."GPD_SCHICHTEN_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_SCHICHTEN" ADD CONSTRAINT "FK_GPD_SCHICHTEN_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_SCHICHTEN_PK" ON "GWBASE"."GPD_SCHICHTEN" ("MSID", "SD_LAYERID", "SD_INTVERSION", "SD_LAYERCNTR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00033$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00030$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00028$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00026$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00024$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00021$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00019$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00017$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000075985C00010$$" ON "GWBASE"."GPD_SCHICHTEN" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GPD_SCHICHTTITEL" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"ST_INTVERSION" NUMBER(10,0), 
	"ST_INTPROJLEITER" NUMBER(10,0), 
	"ST_INTBEARBEITER" NUMBER(10,0), 
	"ST_DTMINTBEARBEITUNG" DATE, 
	"ST_DTMINTAENDERUNG" DATE, 
	"ST_UEBERNAHMEKENNUNG" VARCHAR2(50), 
	"ST_OPFELDBEARBEITER" VARCHAR2(64), 
	"ST_AUSW" VARCHAR2(24), 
	"ST_INTGRUPPE" VARCHAR2(12), 
	"ST_INTBASISVERSION" NUMBER(10,0), 
	"ST_INTNEU" NUMBER(10,0), 
	"ST_INTBEMERKUNG" VARCHAR2(254)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_SCHICHTTITEL_PK" ON "GWBASE"."GPD_SCHICHTTITEL" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_SCHICHTTITEL" ADD CONSTRAINT "GPD_SCHICHTTITEL_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_SCHICHTTITEL_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_SCHICHTTITEL" ADD CONSTRAINT "FK_GPD_SCHICHTTITEL_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_SCHICHTTITEL_PK" ON "GWBASE"."GPD_SCHICHTTITEL" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_SPUELUNG" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"SP_ANFANG" NUMBER(8,2), 
	"SP_ENDE" NUMBER(8,2), 
	"SP_ART" NUMBER(10,0), 
	"SP_ZUSATZ" NUMBER(10,0), 
	"SP_DICHTE" NUMBER(8,2), 
	"SP_DICHTEEINH" NUMBER(10,0), 
	"SP_VERHALTEN" VARCHAR2(255), 
	"SP_MENGE" NUMBER(8,2)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_SPUELUNG_PK" ON "GWBASE"."GPD_SPUELUNG" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_SPUELUNG" ADD CONSTRAINT "GPD_SPUELUNG_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_SPUELUNG_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_SPUELUNG" ADD CONSTRAINT "FK_GPD_SPUELUNG_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_SPUELUNG_PK" ON "GWBASE"."GPD_SPUELUNG" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_STRATIGRAPHIE" 
   (	"STRT_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STRT_PARENTID" NUMBER(10,0), 
	"STRT_HIERARCHIESTUFE" NUMBER(10,0), 
	"STRT_LISTID" NUMBER(10,0), 
	"STRT_ORDER" NUMBER(10,0), 
	"STRT_KUERZEL" VARCHAR2(24), 
	"STRT_KUERZELOFFIZIELL" VARCHAR2(24), 
	"STRT_BEZEICHNUNG" VARCHAR2(128), 
	"STRT_BEMERKUNG" VARCHAR2(255), 
	"STRT_LITHOLOGIEID" NUMBER(10,0), 
	"STRT_FARBE" NUMBER(10,0), 
	"STRT_IMPORTSYNONYME" VARCHAR2(255), 
	"STRT_BEREICHDEFJN" VARCHAR2(1), 
	"STRT_BEREICHVON" NUMBER(10,0), 
	"STRT_BEREICHBIS" NUMBER(10,0), 
	"STRT_SEPZS" VARCHAR2(32), 
	"STRT_ISSEP" VARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_STRATIGRAPHIE_PK" ON "GWBASE"."GPD_STRATIGRAPHIE" ("STRT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_STRATIGRAPHIE" ADD CONSTRAINT "GPD_STRATIGRAPHIE_PK" PRIMARY KEY ("STRT_ID")
  USING INDEX "GWBASE"."GPD_STRATIGRAPHIE_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_STRATIGRAPHIE_PK" ON "GWBASE"."GPD_STRATIGRAPHIE" ("STRT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_STRATLISTS" 
   (	"SLST_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"SLST_HIERARCHIEBASIS" NUMBER(10,0), 
	"SLST_BEZEICHNUNG" VARCHAR2(255), 
	"SLST_PROFILTECFILE" VARCHAR2(255), 
	"SLST_BEMERKUNG" VARCHAR2(255)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_STRATLISTS_PK" ON "GWBASE"."GPD_STRATLISTS" ("SLST_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_STRATLISTS" ADD CONSTRAINT "GPD_STRATLISTS_PK" PRIMARY KEY ("SLST_ID")
  USING INDEX "GWBASE"."GPD_STRATLISTS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_STRATLISTS_PK" ON "GWBASE"."GPD_STRATLISTS" ("SLST_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_SYNONYMKAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"SYN_SORTIERUNG" NUMBER(10,0), 
	"SYN_NAME" VARCHAR2(50), 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWTRANSFERDATE" DATE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_SYNONYMKAT_PK" ON "GWBASE"."GPD_SYNONYMKAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_SYNONYMKAT" ADD CONSTRAINT "GPD_SYNONYMKAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GPD_SYNONYMKAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_SYNONYMKAT_PK" ON "GWBASE"."GPD_SYNONYMKAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_TEMPAUSBAU" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"TARO_OK" NUMBER(8,2), 
	"TARO_UK" NUMBER(8,2), 
	"TARO_TYP" NUMBER(10,0), 
	"TARO_MATERIAL" NUMBER(10,0), 
	"TARO_DURCHMESSER" NUMBER(4,2), 
	"TARO_WANDSTAERKE" NUMBER(4,1), 
	"TARO_BEMERKUNG" VARCHAR2(254)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_TEMPAUSBAU_PK" ON "GWBASE"."GPD_TEMPAUSBAU" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_TEMPAUSBAU" ADD CONSTRAINT "GPD_TEMPAUSBAU_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_TEMPAUSBAU_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_TEMPAUSBAU_PK" ON "GWBASE"."GPD_TEMPAUSBAU" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_TEMPSCHICHTEN" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"RECID" NUMBER(10,0) NOT NULL ENABLE, 
	"TSD_UK" NUMBER(20,4), 
	"TSD_ART" VARCHAR2(128), 
	"TSD_STRATIGRAFIE" VARCHAR2(254), 
	"TSD_PETROGRAFIE" VARCHAR2(254), 
	"TSD_BEMERKUNG" VARCHAR2(254)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_TEMPSCHICHTEN_PK" ON "GWBASE"."GPD_TEMPSCHICHTEN" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_TEMPSCHICHTEN" ADD CONSTRAINT "GPD_TEMPSCHICHTEN_PK" PRIMARY KEY ("MSID", "RECID")
  USING INDEX "GWBASE"."GPD_TEMPSCHICHTEN_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_TEMPSCHICHTEN_PK" ON "GWBASE"."GPD_TEMPSCHICHTEN" ("MSID", "RECID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GPD_WASSERRECHT" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"TYP" VARCHAR2(50), 
	"NR" NUMBER(10,0), 
	"NAME" VARCHAR2(50), 
	"WR1" VARCHAR2(255), 
	"WR2" VARCHAR2(255), 
	"WR3" VARCHAR2(255), 
	"NUTZER" VARCHAR2(50), 
	"QMAX_A" NUMBER(10,2), 
	"QMAX" NUMBER(10,2), 
	"QMAX_H" NUMBER(10,2), 
	"QMAX_S" NUMBER(10,2), 
	"QMIT" NUMBER(10,2), 
	"QMIT_H" NUMBER(10,2), 
	"BEMERKUNG" CLOB, 
	"DATENQUELLE" VARCHAR2(50)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("BEMERKUNG") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."GPD_WASSERRECHT_PK" ON "GWBASE"."GPD_WASSERRECHT" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GPD_WASSERRECHT" ADD CONSTRAINT "GPD_WASSERRECHT_PK" PRIMARY KEY ("MSID")
  USING INDEX "GWBASE"."GPD_WASSERRECHT_PK"  ENABLE;

ALTER TABLE "GWBASE"."GPD_WASSERRECHT" ADD CONSTRAINT "FK_GPD_WASSERRECHT_1" FOREIGN KEY ("MSID")
	  REFERENCES "GWBASE"."GPD_MSSTAMM" ("MSID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GPD_WASSERRECHT_PK" ON "GWBASE"."GPD_WASSERRECHT" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076011C00015$$" ON "GWBASE"."GPD_WASSERRECHT" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_ANALYMETHODS" 
   (	"ID" NUMBER(10,0), 
	"METHODNAME" NVARCHAR2(100), 
	"ISOLD" NVARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_ANALYMETHODS_PK" ON "GWBASE"."GWB_ANALYMETHODS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_ANALYMETHODS" ADD CONSTRAINT "GWB_ANALYMETHODS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_ANALYMETHODS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_ANALYMETHODS_PK" ON "GWBASE"."GWB_ANALYMETHODS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_ANALYSEN" 
   (	"DATUMID" NUMBER(10,0), 
	"PARAMETERID" NUMBER(10,0), 
	"MESSWERT" NUMBER(12,5), 
	"EINHEIT" VARCHAR2(10), 
	"ZUSATZ" CHAR(1) DEFAULT '0', 
	"LOCKED" CHAR(1), 
	"METHOD_ID" NUMBER(10,0), 
	"VALUESTDUNIT" NUMBER(12,5), 
	"STDUNIT" VARCHAR2(10), 
	"ISCALCULATED" NVARCHAR2(1) DEFAULT 'N', 
	"DATATYPE" NUMBER(10,0) DEFAULT 0
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_ANALYSEN_PK" ON "GWBASE"."GWB_ANALYSEN" ("DATUMID", "PARAMETERID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_ANALYSEN" ADD CONSTRAINT "GWB_ANALYSEN_PK" PRIMARY KEY ("DATUMID", "PARAMETERID")
  USING INDEX "GWBASE"."GWB_ANALYSEN_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_ANALYSEN" ADD CONSTRAINT "GWB_ANALY_METHODS_FK" FOREIGN KEY ("METHOD_ID")
	  REFERENCES "GWBASE"."GWB_ANALYMETHODS" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_ANALYSEN" ADD CONSTRAINT "GWB_ANALYSEN_MEASDATE_FK" FOREIGN KEY ("DATUMID")
	  REFERENCES "GWBASE"."GWB_MEASDATE" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_ANALYSEN" ADD CONSTRAINT "GWB_ANALYSEN_PARAMETER_FK" FOREIGN KEY ("PARAMETERID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_ANALYSEN_PK" ON "GWBASE"."GWB_ANALYSEN" ("DATUMID", "PARAMETERID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_BERICHTE" 
   (	"BERICHTSNR" NUMBER(10,0), 
	"TITEL1" VARCHAR2(50), 
	"TITEL2" VARCHAR2(50), 
	"TITEL3" VARCHAR2(50), 
	"TITEL4" VARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_BERICHTE_PK" ON "GWBASE"."GWB_BERICHTE" ("BERICHTSNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_BERICHTE" ADD CONSTRAINT "GWB_BERICHTE_PK" PRIMARY KEY ("BERICHTSNR")
  USING INDEX "GWBASE"."GWB_BERICHTE_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_BERICHTE_PK" ON "GWBASE"."GWB_BERICHTE" ("BERICHTSNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_BETREIB" 
   (	"BETREIBER" VARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_BETREIB_PK" ON "GWBASE"."GWB_BETREIB" ("BETREIBER") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_BETREIB" ADD CONSTRAINT "GWB_BETREIB_PK" PRIMARY KEY ("BETREIBER")
  USING INDEX "GWBASE"."GWB_BETREIB_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_BETREIB_PK" ON "GWBASE"."GWB_BETREIB" ("BETREIBER") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_BOHRFIRM" 
   (	"BOHRFIRMA" VARCHAR2(50), 
	"ADRESSE1" VARCHAR2(50), 
	"ADRESSE2" VARCHAR2(50), 
	"BEMERKUNGEN" VARCHAR2(250), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_BOHRFIRM_PK" ON "GWBASE"."GWB_BOHRFIRM" ("BOHRFIRMA") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_BOHRFIRM" ADD CONSTRAINT "GWB_BOHRFIRM_PK" PRIMARY KEY ("BOHRFIRMA")
  USING INDEX "GWBASE"."GWB_BOHRFIRM_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_BOHRFIRM_PK" ON "GWBASE"."GWB_BOHRFIRM" ("BOHRFIRMA") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_BOHRVERF" 
   (	"BOHRVERFAHREN" VARCHAR2(50), 
	"BEMERKUNGEN" VARCHAR2(250), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_BOHRVERF_PK" ON "GWBASE"."GWB_BOHRVERF" ("BOHRVERFAHREN") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_BOHRVERF" ADD CONSTRAINT "GWB_BOHRVERF_PK" PRIMARY KEY ("BOHRVERFAHREN")
  USING INDEX "GWBASE"."GWB_BOHRVERF_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_BOHRVERF_PK" ON "GWBASE"."GWB_BOHRVERF" ("BOHRVERFAHREN") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_BUILDINGMATERIALCAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_BUILDINGMATERIALCAT_PK" ON "GWBASE"."GWB_BUILDINGMATERIALCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_BUILDINGMATERIALCAT" ADD CONSTRAINT "GWB_BUILDINGMATERIALCAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_BUILDINGMATERIALCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_BUILDIGMATERIALCAT_IDX1" ON "GWBASE"."GWB_BUILDINGMATERIALCAT" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_BUILDINGMATERIALCAT_PK" ON "GWBASE"."GWB_BUILDINGMATERIALCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_CATCHMENTAREAS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"AREANAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;

CREATE UNIQUE INDEX "GWBASE"."GWB_CATCHMENTAREA_IDX1" ON "GWBASE"."GWB_CATCHMENTAREAS" ("AREANAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_CHANGELOGGER" 
   (	"ID" NUMBER(10,0), 
	"MODIFIEDBY" NVARCHAR2(20) NOT NULL ENABLE, 
	"MODIFIEDDATE" DATE NOT NULL ENABLE, 
	"MODIFIEDFIELDS" NCLOB, 
	"COMMANDTYPE" NVARCHAR2(1), 
	"TABLENAME" NVARCHAR2(50), 
	"TABLEDISPLAYNAME" NVARCHAR2(50), 
	"IDENTIFIERTEXT" NVARCHAR2(50), 
	"IDENTIFIERID" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("MODIFIEDFIELDS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_CHANGELOGGER_PK" ON "GWBASE"."GWB_CHANGELOGGER" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_CHANGELOGGER" ADD CONSTRAINT "GWB_CHANGELOGGER_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_CHANGELOGGER_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_CHANGELOGGER_PK" ON "GWBASE"."GWB_CHANGELOGGER" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076022C00004$$" ON "GWBASE"."GWB_CHANGELOGGER" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_CHECKRULES" 
   (	"CR_WELLID" NUMBER(10,0), 
	"CR_PARAMID" NUMBER(10,0), 
	"CR_RULETYPE" NUMBER(4,0), 
	"CR_CHECKVALUE" NUMBER(10,3), 
	"CR_VALIDFROM" DATE, 
	"CR_VALIDUNTIL" DATE, 
	"CR_VALUETYPE" CHAR(1) DEFAULT 'A', 
	"CR_VALUEDESCR" VARCHAR2(50), 
	"CR_ACTIVE" CHAR(1) DEFAULT 'Y', 
	"ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_CHECKRULES_PK" ON "GWBASE"."GWB_CHECKRULES" ("CR_WELLID", "CR_PARAMID", "CR_RULETYPE", "CR_CHECKVALUE", "CR_VALIDFROM", "CR_VALIDUNTIL") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_CHECKRULES" ADD CONSTRAINT "GWB_CHECKRULES_PK" PRIMARY KEY ("CR_WELLID", "CR_PARAMID", "CR_RULETYPE", "CR_CHECKVALUE", "CR_VALIDFROM", "CR_VALIDUNTIL")
  USING INDEX "GWBASE"."GWB_CHECKRULES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_CHECKRULES" ADD CONSTRAINT "GWB_CHECKRULES_PARAM_FK" FOREIGN KEY ("CR_PARAMID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_CHECKRULES" ADD CONSTRAINT "GWB_CHECKRULES_WELL_FK" FOREIGN KEY ("CR_WELLID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_CHECKRULES_PK" ON "GWBASE"."GWB_CHECKRULES" ("CR_WELLID", "CR_PARAMID", "CR_RULETYPE", "CR_CHECKVALUE", "CR_VALIDFROM", "CR_VALIDUNTIL") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_CHECKRULES2" 
   (	"CR_ID" NUMBER(10,0), 
	"CR_WELLID" NUMBER(10,0) NOT NULL ENABLE, 
	"CR_PARAMID" NUMBER(10,0) NOT NULL ENABLE, 
	"CR_RULETYPE" NUMBER(4,0) NOT NULL ENABLE, 
	"CR_CHECKVALUE" NUMBER(10,3), 
	"CR_VALUEDESCR" VARCHAR2(255), 
	"CR_ACTIVE" CHAR(1) DEFAULT 'Y', 
	"CR_SAMPLES" NUMBER(4,0), 
	"CR_CRITICALSAMPLES" NUMBER(4,0), 
	"CR_LOOKAHEADRANGE" NUMBER(4,0), 
	"CR_LOOKAHEADUNIT" CHAR(1), 
	"CR_LOOKBEHINDRANGE" NUMBER(4,0), 
	"CR_LOOKBEHINDUNIT" CHAR(1)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_CHECKRULES2_PK" ON "GWBASE"."GWB_CHECKRULES2" ("CR_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_CHECKRULES2" ADD CONSTRAINT "GWB_CHECKRULES2_PK" PRIMARY KEY ("CR_ID")
  USING INDEX "GWBASE"."GWB_CHECKRULES2_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_CHECKRULES2" ADD CONSTRAINT "GWB_CHECKRULES2_PARAM_FK" FOREIGN KEY ("CR_PARAMID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_CHECKRULES2" ADD CONSTRAINT "GWB_CHECKRULES2_WELL_FK" FOREIGN KEY ("CR_WELLID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_CHECKRULES2_PK" ON "GWBASE"."GWB_CHECKRULES2" ("CR_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_CHECKRULES_TEMPLATES" 
   (	"CR_TEMPLATENAME" VARCHAR2(100), 
	"CR_PARAMID" NUMBER(10,0) NOT NULL ENABLE, 
	"CR_RULETYPE" NUMBER(4,0) NOT NULL ENABLE, 
	"CR_CHECKVALUE" NUMBER(10,3), 
	"CR_VALIDFROM" DATE, 
	"CR_VALIDUNTIL" DATE, 
	"CR_VALUETYPE" CHAR(1) DEFAULT 'A', 
	"CR_VALUEDESCR" VARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;

ALTER TABLE "GWBASE"."GWB_CHECKRULES_TEMPLATES" ADD CONSTRAINT "GWB_CHECKRULESTEMPL_PARAM_FK" FOREIGN KEY ("CR_PARAMID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ON DELETE CASCADE ENABLE;
;

CREATE TABLE "GWBASE"."GWB_CLASS_PARAM" 
   (	"PARAM_ID" NUMBER(10,0), 
	"CLASS_ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_CLASS_PARAM_IDX1" ON "GWBASE"."GWB_CLASS_PARAM" ("CLASS_ID", "PARAM_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_CLASS_PARAM" ADD CONSTRAINT "GWB_CLASSPARAM_PK" PRIMARY KEY ("PARAM_ID", "CLASS_ID")
  USING INDEX "GWBASE"."GWB_CLASS_PARAM_IDX1"  ENABLE;

ALTER TABLE "GWBASE"."GWB_CLASS_PARAM" ADD CONSTRAINT "GWB_CLASSPARAM_CLASS_FK" FOREIGN KEY ("CLASS_ID")
	  REFERENCES "GWBASE"."GWB_STOFFKL" ("CLASS_ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_CLASS_PARAM" ADD CONSTRAINT "GWB_CLASSPARAM_PARAMETER_FK" FOREIGN KEY ("PARAM_ID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_CLASS_PARAM_IDX1" ON "GWBASE"."GWB_CLASS_PARAM" ("CLASS_ID", "PARAM_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_DISCHARGESTATISTIC" 
   (	"WELL_ID" NUMBER(10,0), 
	"STATYEAR" NUMBER(10,0), 
	"QSUM_1" NUMBER(12,3), 
	"QSUM_2" NUMBER(12,3), 
	"QSUM_3" NUMBER(12,3), 
	"QSUM_4" NUMBER(12,3), 
	"QSUM_5" NUMBER(12,3), 
	"QSUM_6" NUMBER(12,3), 
	"QSUM_7" NUMBER(12,3), 
	"QSUM_8" NUMBER(12,3), 
	"QSUM_9" NUMBER(12,3), 
	"QSUM_10" NUMBER(12,3), 
	"QSUM_11" NUMBER(12,3), 
	"QSUM_12" NUMBER(12,3), 
	"QSUM_TOTAL" NUMBER(14,3), 
	"QDAILYMAX_1" NUMBER(12,3), 
	"QDATEDAILYMAX_1" DATE, 
	"QDAILYMAX_2" NUMBER(12,3), 
	"QDATEDAILYMAX_2" DATE, 
	"QDAILYMAX_3" NUMBER(12,3), 
	"QDATEDAILYMAX_3" DATE, 
	"QDAILYMAX_4" NUMBER(12,3), 
	"QDATEDAILYMAX_4" DATE, 
	"QDAILYMAX_5" NUMBER(12,3), 
	"QDATEDAILYMAX_5" DATE, 
	"QDAILYMAX_6" NUMBER(12,3), 
	"QDATEDAILYMAX_6" DATE, 
	"QDAILYMAX_7" NUMBER(12,3), 
	"QDATEDAILYMAX_7" DATE, 
	"QDAILYMAX_8" NUMBER(12,3), 
	"QDATEDAILYMAX_8" DATE, 
	"QDAILYMAX_9" NUMBER(12,3), 
	"QDATEDAILYMAX_9" DATE, 
	"QDAILYMAX_10" NUMBER(12,3), 
	"QDATEDAILYMAX_10" DATE, 
	"QDAILYMAX_11" NUMBER(12,3), 
	"QDATEDAILYMAX_11" DATE, 
	"QDAILYMAX_12" NUMBER(12,3), 
	"QDATEDAILYMAX_12" DATE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_DISCHARGESTATISTIC_PK" ON "GWBASE"."GWB_DISCHARGESTATISTIC" ("WELL_ID", "STATYEAR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_DISCHARGESTATISTIC" ADD CONSTRAINT "GWB_DISCHARGESTATISTIC_PK" PRIMARY KEY ("WELL_ID", "STATYEAR")
  USING INDEX "GWBASE"."GWB_DISCHARGESTATISTIC_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_DISCHARGESTATISTIC" ADD CONSTRAINT "GWB_DISCHARGESTAT_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_DISCHARGESTATISTIC_PK" ON "GWBASE"."GWB_DISCHARGESTATISTIC" ("WELL_ID", "STATYEAR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_DOCCATEGORIES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"CATEGORY" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_DOCCATEGORIES_PK" ON "GWBASE"."GWB_DOCCATEGORIES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_DOCCATEGORIES" ADD CONSTRAINT "GWB_DOCCATEGORIES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_DOCCATEGORIES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_DOCCATEGORIES_PK" ON "GWBASE"."GWB_DOCCATEGORIES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_DOCTYPES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"DOCTYPE" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_DOCTYPES_PK" ON "GWBASE"."GWB_DOCTYPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_DOCTYPES" ADD CONSTRAINT "GWB_DOCTYPES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_DOCTYPES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_DOCTYPES_PK" ON "GWBASE"."GWB_DOCTYPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_EINHEIT" 
   (	"EINHEIT" VARCHAR2(10), 
	"KEYNR" VARCHAR2(10), 
	"UNIT_TYPE" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_EINHEIT_PK" ON "GWBASE"."GWB_EINHEIT" ("EINHEIT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_EINHEIT" ADD CONSTRAINT "GWB_EINHEIT_PK" PRIMARY KEY ("EINHEIT")
  USING INDEX "GWBASE"."GWB_EINHEIT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_EINHEIT_PK" ON "GWBASE"."GWB_EINHEIT" ("EINHEIT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_ELEVATIONQUALITY" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"QUALITYTEXT" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_ELEVATIONQUALITY_PK" ON "GWBASE"."GWB_ELEVATIONQUALITY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_ELEVATIONQUALITY" ADD CONSTRAINT "GWB_ELEVATIONQUALITY_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_ELEVATIONQUALITY_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_ELEVATIONQUALITY_PK" ON "GWBASE"."GWB_ELEVATIONQUALITY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_FIELDCHECKS" 
   (	"TNAME" NVARCHAR2(100) NOT NULL ENABLE, 
	"FNAME" NVARCHAR2(100) NOT NULL ENABLE, 
	"FNAMEDISPLAY" NVARCHAR2(100), 
	"OPTIONS" NUMBER(10,0), 
	"VALUEMIN" NUMBER(12,4), 
	"VALUEMAX" NUMBER(12,4), 
	"FCONDITION" NVARCHAR2(100)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_FIELDCHECKS_PK" ON "GWBASE"."GWB_FIELDCHECKS" ("TNAME", "FNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_FIELDCHECKS" ADD CONSTRAINT "GWB_FIELDCHECKS_PK" PRIMARY KEY ("TNAME", "FNAME")
  USING INDEX "GWBASE"."GWB_FIELDCHECKS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_FIELDCHECKS_PK" ON "GWBASE"."GWB_FIELDCHECKS" ("TNAME", "FNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_FLOWMEASUREMENTCAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_FLOWMEASUREMENTCAT_PK" ON "GWBASE"."GWB_FLOWMEASUREMENTCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_FLOWMEASUREMENTCAT" ADD CONSTRAINT "GWB_FLOWMEASUREMENTCAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_FLOWMEASUREMENTCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_FLOWMEASUREMENTCAT_IDX1" ON "GWBASE"."GWB_FLOWMEASUREMENTCAT" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_FLOWMEASUREMENTCAT_PK" ON "GWBASE"."GWB_FLOWMEASUREMENTCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_GEOLOGIE" 
   (	"ID" NUMBER(10,0), 
	"GEOLOGISCHEEINHEIT" VARCHAR2(50) NOT NULL ENABLE, 
	"SEQNR" NUMBER(10,0), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_GEOLOGIE_PK" ON "GWBASE"."GWB_GEOLOGIE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_GEOLOGIE" ADD CONSTRAINT "GWB_GEOLOGIE_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_GEOLOGIE_PK"  ENABLE;

CREATE INDEX "GWBASE"."GWB_GEOLOGIE_IDX1" ON "GWBASE"."GWB_GEOLOGIE" ("GEOLOGISCHEEINHEIT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE INDEX "GWBASE"."GWB_GEOLOGIE_IDX2" ON "GWBASE"."GWB_GEOLOGIE" ("SEQNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_GEOLOGIE_PK" ON "GWBASE"."GWB_GEOLOGIE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_GERAETE" 
   (	"PROBENNAHMEGERAET" VARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_GERAETE_PK" ON "GWBASE"."GWB_GERAETE" ("PROBENNAHMEGERAET") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_GERAETE" ADD CONSTRAINT "GWB_GERAETE_PK" PRIMARY KEY ("PROBENNAHMEGERAET")
  USING INDEX "GWBASE"."GWB_GERAETE_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_GERAETE_PK" ON "GWBASE"."GWB_GERAETE" ("PROBENNAHMEGERAET") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_GRAPHICS" 
   (	"ID" NUMBER(10,0), 
	"WELL_ID" NUMBER(10,0), 
	"GRAPHICFILE" VARCHAR2(255), 
	"FILEDESCRIPTION" VARCHAR2(255), 
	"FILETYPE" VARCHAR2(10), 
	"SORTNO" NUMBER(10,0), 
	"CREATOR_ID" NUMBER(10,0), 
	"USER_ID" NUMBER(10,0), 
	"PROJECT_ID" NUMBER(10,0), 
	"DOCTYPE_ID" NUMBER(10,0), 
	"CATEGORY_ID" NUMBER(10,0), 
	"FILEORDIR" NVARCHAR2(1) DEFAULT 'F', 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWFILEDATE" DATE, 
	"DISPLAYNAME" NVARCHAR2(64)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_GRAPHICS_PK" ON "GWBASE"."GWB_GRAPHICS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_GRAPHICS" ADD CONSTRAINT "GWB_GRAPHICS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_GRAPHICS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_GRAPHICS_PK" ON "GWBASE"."GWB_GRAPHICS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_GRENZEN" 
   (	"XMIN" NUMBER(12,4), 
	"XMAX" NUMBER(12,4), 
	"YMIN" NUMBER(12,4), 
	"YMAX" NUMBER(12,4)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_GWSTOCKW" 
   (	"ID" NUMBER(10,0), 
	"GRUNDWASSERSTOCKWERK" VARCHAR2(50) NOT NULL ENABLE, 
	"SEQNR" NUMBER(10,0), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_GWSTOCKW_PK" ON "GWBASE"."GWB_GWSTOCKW" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_GWSTOCKW" ADD CONSTRAINT "GWB_GWSTOCKW_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_GWSTOCKW_PK"  ENABLE;

CREATE INDEX "GWBASE"."GWB_GWSTOCKW_IDX1" ON "GWBASE"."GWB_GWSTOCKW" ("GRUNDWASSERSTOCKWERK") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE INDEX "GWBASE"."GWB_GWSTOCKW_IDX2" ON "GWBASE"."GWB_GWSTOCKW" ("SEQNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_GWSTOCKW_PK" ON "GWBASE"."GWB_GWSTOCKW" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_HCHANGE" 
   (	"MESSTELLENID" NUMBER(10,0), 
	"DATUMAENDERUNG" DATE, 
	"NEUEHOEHEMP" NUMBER(7,3), 
	"NEUEHOEHEOKG" NUMBER(7,3), 
	"QUALITY_ID" NUMBER(10,0), 
	"COMMENT" NVARCHAR2(100), 
	"FILTERBTM" NUMBER(8,2)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_HCHANGE_PK" ON "GWBASE"."GWB_HCHANGE" ("MESSTELLENID", "DATUMAENDERUNG") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_HCHANGE" ADD CONSTRAINT "GWB_HCHANGE_PK" PRIMARY KEY ("MESSTELLENID", "DATUMAENDERUNG")
  USING INDEX "GWBASE"."GWB_HCHANGE_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_HCHANGE" ADD CONSTRAINT "GWB_HCHANGE_WELLS_FK" FOREIGN KEY ("MESSTELLENID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_HCHANGE_PK" ON "GWBASE"."GWB_HCHANGE" ("MESSTELLENID", "DATUMAENDERUNG") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_IMPORTS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"IMPORTDATE" DATE, 
	"IMPORTEDBY" VARCHAR2(30), 
	"FILEORDIR" VARCHAR2(255), 
	"NOOFFILES" NUMBER(10,0), 
	"IMPORTFORMAT" VARCHAR2(100)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_IMPORT_PK" ON "GWBASE"."GWB_IMPORTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_IMPORTS" ADD CONSTRAINT "GWB_IMPORT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_IMPORT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_IMPORT_PK" ON "GWBASE"."GWB_IMPORTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_INOUTLETSTRUCTURE" 
   (	"OBJECT_ID" NUMBER(10,0), 
	"LENGTH" NUMBER(10,2), 
	"WIDTH" NUMBER(10,2), 
	"HEIGHT" NUMBER(10,2), 
	"GAUGEWIDTH" NUMBER(10,2), 
	"FILTERAREASIZE" NUMBER(10,2), 
	"COMMENTTEXT" NCLOB
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("COMMENTTEXT") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_INOUTLETSTRUCTURE_PK" ON "GWBASE"."GWB_INOUTLETSTRUCTURE" ("OBJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_INOUTLETSTRUCTURE" ADD CONSTRAINT "GWB_INOUTLETSTRUCTURE_PK" PRIMARY KEY ("OBJECT_ID")
  USING INDEX "GWBASE"."GWB_INOUTLETSTRUCTURE_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_INOUTLETSTRUCTURE" ADD CONSTRAINT "GWB_INOUTLETSTRUCTURE_OBJECT_FK" FOREIGN KEY ("OBJECT_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_INOUTLETSTRUCTURE_PK" ON "GWBASE"."GWB_INOUTLETSTRUCTURE" ("OBJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076043C00007$$" ON "GWBASE"."GWB_INOUTLETSTRUCTURE" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_IONRATIOS" 
   (	"DATE_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MG_CA" NUMBER(10,4), 
	"NA_MG" NUMBER(10,4), 
	"NAK_CL" NUMBER(10,4), 
	"CL_SO4" NUMBER(10,4), 
	"CL_NA" NUMBER(10,4), 
	"CAMG_NAK" NUMBER(10,4), 
	"NA_K" NUMBER(10,4), 
	"CL_BR" NUMBER(10,4), 
	"HCO3_CLSO4" NUMBER(10,4), 
	"K_CA" NUMBER(10,4), 
	"DONE" NVARCHAR2(1) DEFAULT 'N'
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_KEYWORDS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"KEYWORD" NVARCHAR2(50) NOT NULL ENABLE, 
	"CATEGORY_ID" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_KEYWORDS_PK" ON "GWBASE"."GWB_KEYWORDS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_KEYWORDS" ADD CONSTRAINT "GWB_KEYWORDS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_KEYWORDS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_KEYWORDS_PK" ON "GWBASE"."GWB_KEYWORDS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_KEYWORD_OBJECTS" 
   (	"KEYWORD_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"OBJECT_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"OBJECT_TYPE" NVARCHAR2(1) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_KEYWORD_OBJECTS_PK" ON "GWBASE"."GWB_KEYWORD_OBJECTS" ("KEYWORD_ID", "OBJECT_ID", "OBJECT_TYPE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_KEYWORD_OBJECTS" ADD CONSTRAINT "GWB_KEYWORD_OBJECTS_PK" PRIMARY KEY ("KEYWORD_ID", "OBJECT_ID", "OBJECT_TYPE")
  USING INDEX "GWBASE"."GWB_KEYWORD_OBJECTS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_KEYWORD_OBJECTS_PK" ON "GWBASE"."GWB_KEYWORD_OBJECTS" ("KEYWORD_ID", "OBJECT_ID", "OBJECT_TYPE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_LABELS" 
   (	"LABEL_WELLNR1" VARCHAR2(50), 
	"LABEL_WELLNR2" VARCHAR2(50), 
	"LABEL_WELLNAME" VARCHAR2(50), 
	"LABEL_MAP" VARCHAR2(50), 
	"LABEL_WELLTYPE" VARCHAR2(50), 
	"LABEL_WELLUSAGE" VARCHAR2(50), 
	"LABEL_WELLCITY" VARCHAR2(50), 
	"LABEL_WELLDISTRICT" VARCHAR2(50), 
	"LABEL_WELLSUBDISTR" VARCHAR2(50), 
	"LABEL_WELLSUBDISTRNO" VARCHAR2(50), 
	"LABEL_POSITION" VARCHAR2(50), 
	"LABEL_OWNER" VARCHAR2(50), 
	"LABEL_OPERATEDBY" VARCHAR2(50), 
	"LABEL_XCOORD" VARCHAR2(50), 
	"LABEL_YCOORD" VARCHAR2(50), 
	"LABEL_USERFIELD1" VARCHAR2(50), 
	"LABEL_USERFIELD2" VARCHAR2(50), 
	"LABEL_USERFIELD3" VARCHAR2(50), 
	"LABEL_USERFIELD4" VARCHAR2(50), 
	"LABEL_USERFIELD5" VARCHAR2(50), 
	"LABEL_PROJREFNO1" NVARCHAR2(50), 
	"LABEL_PROJREFNO2" NVARCHAR2(50), 
	"LABEL_PROJREFNO3" NVARCHAR2(50), 
	"LABEL_PROJREFNO4" NVARCHAR2(50), 
	"LABEL_PROJREFNO5" NVARCHAR2(50), 
	"LABEL_PROJLOGIC1" NVARCHAR2(50), 
	"LABEL_PROJLOGIC2" NVARCHAR2(50), 
	"LABEL_PROJLOGIC3" NVARCHAR2(50), 
	"LABEL_PROJLOGIC4" NVARCHAR2(50), 
	"LABEL_PROJLOGIC5" NVARCHAR2(50), 
	"LABEL_PROJTEXT1" NVARCHAR2(50), 
	"LABEL_PROJTEXT2" NVARCHAR2(50), 
	"LABEL_PROJTEXT3" NVARCHAR2(50), 
	"LABEL_PROJTEXT4" NVARCHAR2(50), 
	"LABEL_PROJTEXT5" NVARCHAR2(50), 
	"LABEL_SURFACEWATER" NVARCHAR2(50), 
	"LABEL_SURFACEWATERPART" NVARCHAR2(50), 
	"LABEL_SURFACEWATERKM" NVARCHAR2(50), 
	"LABEL_SAP_KEY" NVARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_LABORS" 
   (	"ID" NUMBER(10,0), 
	"LABOR" NVARCHAR2(100) NOT NULL ENABLE, 
	"ADRESSE1" VARCHAR2(50), 
	"ADRESSE2" VARCHAR2(50), 
	"BEMERKUNGEN" VARCHAR2(250), 
	"KEYNR" VARCHAR2(10), 
	"RELATIONFILE" VARCHAR2(255)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_LABORS_PK" ON "GWBASE"."GWB_LABORS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_LABORS" ADD CONSTRAINT "GWB_LABORS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_LABORS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_LABORS_PK" ON "GWBASE"."GWB_LABORS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_LEVELCOMMENTS" 
   (	"COMMENTID" NUMBER(10,0), 
	"COMMENTTEXT" VARCHAR2(50), 
	"KEYNR" VARCHAR2(10), 
	"QUALITY" CHAR(1) DEFAULT '+', 
	"TODOCATEGORY_ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_LEVELCOMMENTS_PK" ON "GWBASE"."GWB_LEVELCOMMENTS" ("COMMENTID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_LEVELCOMMENTS" ADD CONSTRAINT "GWB_LEVELCOMMENTS_PK" PRIMARY KEY ("COMMENTID")
  USING INDEX "GWBASE"."GWB_LEVELCOMMENTS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_LEVELCOMMENTS" ADD CONSTRAINT "GWB_LEVELCOMM_TODOCAT_FK" FOREIGN KEY ("TODOCATEGORY_ID")
	  REFERENCES "GWBASE"."GWB_TODOCATEGORIES" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_LEVELCOMMENTS_PK" ON "GWBASE"."GWB_LEVELCOMMENTS" ("COMMENTID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_LEVELSTATISTIC" 
   (	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STATYEAR" NUMBER(10,0), 
	"MAXLEVEL_SL" NUMBER(8,2), 
	"MINLEVEL_SL" NUMBER(8,2), 
	"AVLEVEL_SL" NUMBER(8,2)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_LEVEL_ATTRIBUTES" 
   (	"LA_DATE_ID" NUMBER(10,0), 
	"LA_ATTRIBUTE_ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_LEVEL_ATTRIBUTES_PK" ON "GWBASE"."GWB_LEVEL_ATTRIBUTES" ("LA_DATE_ID", "LA_ATTRIBUTE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_LEVEL_ATTRIBUTES" ADD CONSTRAINT "GWB_LEVEL_ATTRIBUTES_PK" PRIMARY KEY ("LA_DATE_ID", "LA_ATTRIBUTE_ID")
  USING INDEX "GWBASE"."GWB_LEVEL_ATTRIBUTES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_LEVEL_ATTRIBUTES" ADD CONSTRAINT "GWB_LEVELATTR_COMMENTS_FK" FOREIGN KEY ("LA_ATTRIBUTE_ID")
	  REFERENCES "GWBASE"."GWB_LEVELCOMMENTS" ("COMMENTID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_LEVEL_ATTRIBUTES" ADD CONSTRAINT "GWB_LEVELATTR_DATES_FK" FOREIGN KEY ("LA_DATE_ID")
	  REFERENCES "GWBASE"."GWB_WSTAND" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_LEVEL_ATTRIBUTES_PK" ON "GWBASE"."GWB_LEVEL_ATTRIBUTES" ("LA_DATE_ID", "LA_ATTRIBUTE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_LOGINS" 
   (	"USER_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"LOGINTIME" DATE, 
	"LOGOFFTIME" DATE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_LOGINS_PK" ON "GWBASE"."GWB_LOGINS" ("USER_ID", "LOGINTIME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_LOGINS" ADD CONSTRAINT "GWB_LOGINS_PK" PRIMARY KEY ("USER_ID", "LOGINTIME")
  USING INDEX "GWBASE"."GWB_LOGINS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_LOGINS_PK" ON "GWBASE"."GWB_LOGINS" ("USER_ID", "LOGINTIME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_MANHOLE" 
   (	"OBJECT_ID" NUMBER(10,0), 
	"GEOMETRYTYPE" NVARCHAR2(1), 
	"LENGTH" NUMBER(10,2), 
	"WIDTH" NUMBER(10,2), 
	"HEIGHT" NUMBER(10,2), 
	"MATERIAL_ID" NUMBER(10,0), 
	"ACCESSGEOMETRYTYPE" NVARCHAR2(1), 
	"ACCESSLENGTH" NUMBER(10,2), 
	"ACCESSWIDTH" NUMBER(10,2), 
	"ELECTRIFICATION" NVARCHAR2(1), 
	"REMOTECONTROL" NVARCHAR2(1), 
	"COMMENTTEXT" NCLOB, 
	"TOTALHEIGHT" NUMBER(10,2)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("COMMENTTEXT") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MANHOLE_PK" ON "GWBASE"."GWB_MANHOLE" ("OBJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_MANHOLE" ADD CONSTRAINT "GWB_MANHOLE_PK" PRIMARY KEY ("OBJECT_ID")
  USING INDEX "GWBASE"."GWB_MANHOLE_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_MANHOLE" ADD CONSTRAINT "GWB_MANHOLE_OBJECT_FK" FOREIGN KEY ("OBJECT_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_MANHOLE" ADD CONSTRAINT "GWB_MANHOLE_MATERIAL_FK" FOREIGN KEY ("MATERIAL_ID")
	  REFERENCES "GWBASE"."GWB_BUILDINGMATERIALCAT" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_MANHOLE_PK" ON "GWBASE"."GWB_MANHOLE" ("OBJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076055C00012$$" ON "GWBASE"."GWB_MANHOLE" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_MAPS" 
   (	"ID" NUMBER(10,0), 
	"MAPFILE" VARCHAR2(255), 
	"MAPCOMMENT" VARCHAR2(50), 
	"XMINMAP" NUMBER(12,4), 
	"XMAXMAP" NUMBER(12,4), 
	"YMINMAP" NUMBER(12,4), 
	"YMAXMAP" NUMBER(12,4), 
	"CONTOURMAP" CHAR(1) DEFAULT 'N', 
	"SELECTMAP" CHAR(1) DEFAULT 'N', 
	"DIGITIZEMAP" CHAR(1) DEFAULT 'N', 
	"BLANKAREA" CHAR(1) DEFAULT 'N', 
	"BLITMODE" CHAR(1) DEFAULT 'D', 
	"PIXELSX" NUMBER(10,0), 
	"PIXELSY" NUMBER(10,0), 
	"RESOLUTION" NUMBER(10,0), 
	"PROJECT_ID" NUMBER(10,0), 
	"LINECOLOR" NUMBER(10,0), 
	"LINEWIDTH" NUMBER(10,0), 
	"ALLWAYSUSE" CHAR(1), 
	"UTM_EAST_MINMAP" NUMBER(12,4), 
	"UTM_NORTH_MINMAP" NUMBER(12,4), 
	"UTM_EAST_MAXMAP" NUMBER(12,4), 
	"UTM_NORTH_MAXMAP" NUMBER(12,4), 
	"LAYERINFO" CLOB, 
	"MAPUSEOPTION" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("LAYERINFO") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MAPS_PK" ON "GWBASE"."GWB_MAPS" ("MAPCOMMENT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_MAPS" ADD CONSTRAINT "GWB_MAPS_PK" PRIMARY KEY ("MAPCOMMENT")
  USING INDEX "GWBASE"."GWB_MAPS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_MAPS_PK" ON "GWBASE"."GWB_MAPS" ("MAPCOMMENT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076058C00024$$" ON "GWBASE"."GWB_MAPS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_MAPS_PROJECTS" 
   (	"MAP_ID" NUMBER(10,0), 
	"PROJECT_ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MAPS_PROJECTS_PK" ON "GWBASE"."GWB_MAPS_PROJECTS" ("MAP_ID", "PROJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_MAPS_PROJECTS" ADD CONSTRAINT "GWB_MAPS_PROJECTS_PK" PRIMARY KEY ("MAP_ID", "PROJECT_ID")
  USING INDEX "GWBASE"."GWB_MAPS_PROJECTS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_MAPS_PROJECTS_PK" ON "GWBASE"."GWB_MAPS_PROJECTS" ("MAP_ID", "PROJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_MEASDATE" 
   (	"ID" NUMBER(10,0), 
	"LOGGER" CHAR(1) DEFAULT '0', 
	"MESSTELLENID" NUMBER(10,0), 
	"MESSDATUM" DATE, 
	"PROGID" NUMBER(10,0), 
	"DEPTH" NUMBER(7,3), 
	"INFO" CHAR(2), 
	"IMPORT_ID" NUMBER(10,0), 
	"MARKER" NVARCHAR2(1) DEFAULT '+', 
	"DEPTHRANGE" NUMBER(10,0) DEFAULT 0, 
	"SAMPLESTATE" NUMBER(2,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MEASDATE_PK" ON "GWBASE"."GWB_MEASDATE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_MEASDATE" ADD CONSTRAINT "GWB_MEASDATE_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_MEASDATE_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_MEASDATE" ADD CONSTRAINT "GWB_MEASDATE_WELL_FK" FOREIGN KEY ("MESSTELLENID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE INDEX "GWBASE"."IX_MEASDATE_LOGGER" ON "GWBASE"."GWB_MEASDATE" ("LOGGER", "MESSTELLENID", "MESSDATUM") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE INDEX "GWBASE"."GWB_MEASDATE_IDX1" ON "GWBASE"."GWB_MEASDATE" ("MESSTELLENID", "MESSDATUM") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MEASDATE_PK" ON "GWBASE"."GWB_MEASDATE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_MEMOS" 
   (	"WELL_ID" NUMBER(10,0), 
	"MEMOTYPE" NUMBER(10,0), 
	"DATE_ID" NUMBER(10,0), 
	"COMMENTTEXT" CLOB
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("COMMENTTEXT") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MEMOS_PK" ON "GWBASE"."GWB_MEMOS" ("WELL_ID", "MEMOTYPE", "DATE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_MEMOS" ADD CONSTRAINT "GWB_MEMOS_PK" PRIMARY KEY ("WELL_ID", "MEMOTYPE", "DATE_ID")
  USING INDEX "GWBASE"."GWB_MEMOS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_MEMOS" ADD CONSTRAINT "GWB_MEMOS_WELLS_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_MEMOS_PK" ON "GWBASE"."GWB_MEMOS" ("WELL_ID", "MEMOTYPE", "DATE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076063C00004$$" ON "GWBASE"."GWB_MEMOS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_MISCSTRUCTURE" 
   (	"OBJECT_ID" NUMBER(10,0), 
	"COMMENTTEXT" NCLOB
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("COMMENTTEXT") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MISCSTRUCTURE_PK" ON "GWBASE"."GWB_MISCSTRUCTURE" ("OBJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_MISCSTRUCTURE" ADD CONSTRAINT "GWB_MISCSTRUCTURE_PK" PRIMARY KEY ("OBJECT_ID")
  USING INDEX "GWBASE"."GWB_MISCSTRUCTURE_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_MISCSTRUCTURE" ADD CONSTRAINT "GWB_MISCSTRUCTURE_OBJECT_FK" FOREIGN KEY ("OBJECT_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_MISCSTRUCTURE_PK" ON "GWBASE"."GWB_MISCSTRUCTURE" ("OBJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076066C00002$$" ON "GWBASE"."GWB_MISCSTRUCTURE" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_MSART" 
   (	"MSART" VARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MSART_PK" ON "GWBASE"."GWB_MSART" ("MSART") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_MSART" ADD CONSTRAINT "GWB_MSART_PK" PRIMARY KEY ("MSART")
  USING INDEX "GWBASE"."GWB_MSART_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_MSART_PK" ON "GWBASE"."GWB_MSART" ("MSART") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_MSSTAMM" 
   (	"ID" NUMBER(10,0), 
	"KENNNR" VARCHAR2(30) NOT NULL ENABLE, 
	"KENNNR2" VARCHAR2(30), 
	"BEZEICHNUNG" VARCHAR2(50), 
	"RECHTSWERT" NUMBER(12,4), 
	"HOCHWERT" NUMBER(12,4), 
	"XLABEL" NUMBER(12,4), 
	"YLABEL" NUMBER(12,4), 
	"HOEHEMP" NUMBER(7,3), 
	"HOEHEOKG" NUMBER(7,3), 
	"TK25" VARCHAR2(20), 
	"BETREIBER" VARCHAR2(50), 
	"ORT" VARCHAR2(50), 
	"GEMARKUNG" VARCHAR2(50), 
	"FLUR" VARCHAR2(20), 
	"FLURSTUECK" VARCHAR2(20), 
	"GRUNDEIGNER" VARCHAR2(50), 
	"LAGE" VARCHAR2(100), 
	"BAUJAHR" CHAR(4), 
	"BESEITIGT" CHAR(4), 
	"NACHFOLGER" VARCHAR2(20), 
	"VORGAENGER" VARCHAR2(20), 
	"ART" VARCHAR2(50), 
	"NUTZUNG" VARCHAR2(50), 
	"KAT1" CHAR(1) DEFAULT 'N', 
	"KAT2" CHAR(1) DEFAULT 'N', 
	"KAT3" CHAR(1) DEFAULT 'N', 
	"KAT4" CHAR(1) DEFAULT 'N', 
	"KAT5" CHAR(1) DEFAULT 'N', 
	"KAT6" CHAR(1) DEFAULT 'N', 
	"KAT7" CHAR(1) DEFAULT 'N', 
	"KAT8" CHAR(1) DEFAULT 'N', 
	"KAT9" CHAR(1) DEFAULT 'N', 
	"KAT10" CHAR(1) DEFAULT 'N', 
	"LAGEPLANDATEI" VARCHAR2(200), 
	"BILDDATEI" VARCHAR2(200), 
	"BOHRFIRMA" VARCHAR2(50), 
	"BOHRDURCHMESSER" VARCHAR2(50), 
	"BOHRVERFAHREN" VARCHAR2(50), 
	"BOHRTIEFE" VARCHAR2(10), 
	"AUSBAUMATERIAL" VARCHAR2(20), 
	"AUSBAUDURCHM" VARCHAR2(50), 
	"AUSBAUTIEFE" VARCHAR2(10), 
	"FILTERSTRECKEN" VARCHAR2(50), 
	"FILTERTOP" NUMBER(8,2), 
	"FILTERBOTTOM" NUMBER(8,2), 
	"SCHLITZWEITE" VARCHAR2(10), 
	"FILTERKIES" VARCHAR2(20), 
	"TONSPERREN" VARCHAR2(50), 
	"AUSBAUDATEI" VARCHAR2(200), 
	"GEOLOGY_ID" NUMBER(10,0), 
	"GESTEINSART" VARCHAR2(50), 
	"KWERT" VARCHAR2(10), 
	"AQUIFER_ID" NUMBER(10,0), 
	"AQUIFERTOP" NUMBER(7,1), 
	"AQUIFERBASE" NUMBER(7,1), 
	"GWGESPANNT" CHAR(1) DEFAULT 'N', 
	"SCHICHTENDATEI" VARCHAR2(200), 
	"MESSINTERVALLWS" NUMBER(10,0), 
	"LETZTEMESSUNG" DATE, 
	"BEPROBINTERVALL" NUMBER(10,0), 
	"LETZTEBEPROBUNG" DATE, 
	"WPLAN" CHAR(1) DEFAULT 'Y', 
	"APLAN" CHAR(1) DEFAULT 'Y', 
	"UPROGRAMMNR" NUMBER(10,0), 
	"STATISTIKANFANG" DATE, 
	"STATISTIKENDE" DATE, 
	"NNMITTEL" NUMBER(7,3), 
	"NNMAX" NUMBER(7,3), 
	"NNMIN" NUMBER(7,3), 
	"FLURABSTMITTEL" NUMBER(7,3), 
	"FLURABSTMAX" NUMBER(7,3), 
	"FLURABSTMIN" NUMBER(7,3), 
	"DATUMMIN" DATE, 
	"DATUMMAX" DATE, 
	"SYMBOL" NUMBER(10,0), 
	"QEINHEIT" CHAR(1), 
	"QART" CHAR(1), 
	"MESSPUNKT" VARCHAR2(25), 
	"TOLERANZ" NUMBER(7,3), 
	"EXTPROG1NAME" VARCHAR2(20), 
	"EXTPROG1FILEEXT" CHAR(3), 
	"EXTPROG1PATH" VARCHAR2(100), 
	"EXTPROG1FILE" VARCHAR2(200), 
	"EXTPROG2NAME" VARCHAR2(20), 
	"EXTPROG2FILEEXT" CHAR(3), 
	"EXTPROG2PATH" VARCHAR2(100), 
	"EXTPROG2FILE" VARCHAR2(200), 
	"MESSPUNKTBILDDATEI" VARCHAR2(200), 
	"BARCODE" VARCHAR2(20), 
	"P_REP_ID" NUMBER(10,0), 
	"NEGATELEVELS" CHAR(1) DEFAULT 'N', 
	"DEPTHREFERENCE" CHAR(1), 
	"CNT_LEVELS" NUMBER(10,0), 
	"CNT_SAMPLES" NUMBER(10,0), 
	"CNT_RATES" NUMBER(10,0), 
	"CNT_FILES" NUMBER(10,0), 
	"UTM_EAST" NUMBER(12,4), 
	"UTM_NORTH" NUMBER(12,4), 
	"VISIBLETABS" VARCHAR2(40), 
	"WEB_WELLCAT" VARCHAR2(2), 
	"WEB_LEVELCAT" VARCHAR2(2), 
	"WEB_ANALYCAT" VARCHAR2(2), 
	"WEB_RATECAT" VARCHAR2(2), 
	"WEB_LEVELSTATCAT" VARCHAR2(2), 
	"WEB_ANALYSTATCAT" VARCHAR2(2), 
	"WEB_RATESTATCAT" VARCHAR2(2), 
	"LEVELUPPERBOUND" NUMBER(8,2), 
	"LEVELLOWERBOUND" NUMBER(8,2), 
	"FILTERBOTTOM_SL" NUMBER(8,2), 
	"FILTERTOP_SL" NUMBER(8,2), 
	"ABSMAXLEVEL_SL" NUMBER(8,2), 
	"AVMAXLEVEL_SL" NUMBER(8,2), 
	"ABSMINLEVEL_SL" NUMBER(8,2), 
	"AVMINLEVEL_SL" NUMBER(8,2), 
	"AVMEANLEVEL_SL" NUMBER(8,2), 
	"SEQNO" NUMBER(10,0), 
	"DATEBUILD" DATE, 
	"DATEDESTROYED" DATE, 
	"DRILLELEVATION" NUMBER(10,2), 
	"SAMPLINGDEPTH" NUMBER(10,2), 
	"STATUS_ID" NUMBER(10,0), 
	"STATIONTYPE" NUMBER(10,0) DEFAULT 1, 
	"SAP_KEY" NVARCHAR2(50), 
	"STANDARDSAMPLINGTYPE" NVARCHAR2(50), 
	"SURFACEWATER_ID" NUMBER(10,0), 
	"SURFACEWATERPART_ID" NUMBER(10,0), 
	"KM" NUMBER(10,2), 
	"SURFACEWATERDISTANCE" NUMBER(12,4), 
	"CATCHMENTAREA_ID" NUMBER(10,0), 
	"AQUIFERTHICKNESS" NVARCHAR2(20), 
	"FILTERLENGTH" NUMBER(10,2), 
	"STREETKEY" NVARCHAR2(20), 
	"HOUSENO" NVARCHAR2(10), 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWTRANSFERDATE" DATE, 
	"GWWLEVELS" NCHAR(1) DEFAULT '-', 
	"GWWRATES" NCHAR(1) DEFAULT '-', 
	"GWWANALYSES" NCHAR(1) DEFAULT '-', 
	"GWWLOGGER" NCHAR(1) DEFAULT '-', 
	"GWWRAIN" NCHAR(1) DEFAULT '-', 
	"GWWCLIMATE" NCHAR(1) DEFAULT '-', 
	"GWWFILEDATE" DATE, 
	"MODIFYDATE" DATE, 
	"GROUPNO" NVARCHAR2(50), 
	"DRILLEDDEPTH" NUMBER(8,2), 
	"SUMPTRAPLENGTH" NUMBER(5,2)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MSSTAMM_PK" ON "GWBASE"."GWB_MSSTAMM" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_MSSTAMM" ADD CONSTRAINT "GWB_MSSTAMM_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_MSSTAMM_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_MSSTAMM" ADD CONSTRAINT "GWB_WELLS_AQUIFER_FK" FOREIGN KEY ("AQUIFER_ID")
	  REFERENCES "GWBASE"."GWB_GWSTOCKW" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_MSSTAMM" ADD CONSTRAINT "GWB_WELLS_GEOLOGY_FK" FOREIGN KEY ("GEOLOGY_ID")
	  REFERENCES "GWBASE"."GWB_GEOLOGIE" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_MSSTAMM" ADD CONSTRAINT "GWB_MSSTAMM_STATUS_FK" FOREIGN KEY ("STATUS_ID")
	  REFERENCES "GWBASE"."GWB_WELLSTATUSCAT" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_MSSTAMM_IDX1" ON "GWBASE"."GWB_MSSTAMM" ("KENNNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE INDEX "GWBASE"."GWB_MSSTAMM_IDX2" ON "GWBASE"."GWB_MSSTAMM" ("KENNNR2") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_MSSTAMM_PK" ON "GWBASE"."GWB_MSSTAMM" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_MSSTAMM_TEMP" 
   (	"KENNNR" VARCHAR2(50)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_NUTZUNG" 
   (	"NUTZUNG" VARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_NUTZUNG_PK" ON "GWBASE"."GWB_NUTZUNG" ("NUTZUNG") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_NUTZUNG" ADD CONSTRAINT "GWB_NUTZUNG_PK" PRIMARY KEY ("NUTZUNG")
  USING INDEX "GWBASE"."GWB_NUTZUNG_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_NUTZUNG_PK" ON "GWBASE"."GWB_NUTZUNG" ("NUTZUNG") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_OBJECTTYPES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"DESCRIPTION" NVARCHAR2(100) NOT NULL ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWB_OBJECTTYPES" ON "GWBASE"."GWB_OBJECTTYPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_OBJECTTYPES" ADD CONSTRAINT "PK_GWB_OBJECTTYPES" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."PK_GWB_OBJECTTYPES"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWB_OBJECTTYPES" ON "GWBASE"."GWB_OBJECTTYPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_OBJECT_PIPES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"OBJECT_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE, 
	"WATERTYPE_ID" NUMBER(10,0), 
	"INPUTPIPE_ID" NUMBER(10,0), 
	"OUTPUTPIPE_ID" NUMBER(10,0), 
	"PIPETYPE_ID" NUMBER(10,0), 
	"ELEVATION" NUMBER(10,2), 
	"DIAMETER" NUMBER(10,0), 
	"MATERIAL_ID" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_OBJECT_PIPES_PK" ON "GWBASE"."GWB_OBJECT_PIPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_OBJECT_PIPES" ADD CONSTRAINT "GWB_OBJECT_PIPES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_OBJECT_PIPES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_OBJECT_PIPES" ADD CONSTRAINT "GWB_OBJECT_PIPES_OBJECT_FK" FOREIGN KEY ("OBJECT_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_OBJECT_PIPES" ADD CONSTRAINT "GWB_OBJECT_PIPES_WATERTYPE_FK" FOREIGN KEY ("WATERTYPE_ID")
	  REFERENCES "GWBASE"."GWB_WATERTYPECAT" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_OBJECT_PIPES" ADD CONSTRAINT "GWB_OBJECT_PIPES_INPUTPIPE_FK" FOREIGN KEY ("INPUTPIPE_ID")
	  REFERENCES "GWBASE"."GWB_PIPES" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_OBJECT_PIPES" ADD CONSTRAINT "GWB_OBJECT_PIPES_OUTPUTPIPE_FK" FOREIGN KEY ("OUTPUTPIPE_ID")
	  REFERENCES "GWBASE"."GWB_PIPES" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_OBJECT_PIPES" ADD CONSTRAINT "GWB_OBJECT_PIPES_PIPETYPE_FK" FOREIGN KEY ("PIPETYPE_ID")
	  REFERENCES "GWBASE"."GWB_PIPETYPECAT" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_OBJECT_PIPES" ADD CONSTRAINT "GWB_OBJECT_PIPES_MATERIAL_FK" FOREIGN KEY ("MATERIAL_ID")
	  REFERENCES "GWBASE"."GWB_PIPEMATERIALCAT" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_OBJECT_PIPES_PK" ON "GWBASE"."GWB_OBJECT_PIPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_OBJECT_TECHPARTS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"OBJECT_ID" NUMBER(10,0), 
	"PART_ID" NUMBER(10,0), 
	"COMMENTTEXT" NVARCHAR2(255)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_OBJECT_TECHPARTS_PK" ON "GWBASE"."GWB_OBJECT_TECHPARTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_OBJECT_TECHPARTS" ADD CONSTRAINT "GWB_OBJECT_TECHPARTS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_OBJECT_TECHPARTS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_OBJECT_TECHPARTS" ADD CONSTRAINT "GWB_OBJECT_TECHPARTS_OBJECT_FK" FOREIGN KEY ("OBJECT_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_OBJECT_TECHPARTS" ADD CONSTRAINT "GWB_OBJECT_TECHPARTS_PART_FK" FOREIGN KEY ("PART_ID")
	  REFERENCES "GWBASE"."GWB_TECHPARTSCAT" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_OBJECT_TECHPARTS_PK" ON "GWBASE"."GWB_OBJECT_TECHPARTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PARAMET" 
   (	"ID" NUMBER(10,0), 
	"PARAMETERKUERZEL" VARCHAR2(20), 
	"PARAMETERNAME" VARCHAR2(100), 
	"STANDARDEINHEIT" VARCHAR2(10), 
	"STANDARDUNITSOIL" VARCHAR2(10), 
	"STANDARDUNITELUAT" VARCHAR2(10), 
	"STANDARDUNITAIR" VARCHAR2(10), 
	"KEYNR" VARCHAR2(10), 
	"KEYNR2" VARCHAR2(10), 
	"PARAMTYPE" NUMBER(10,0), 
	"ISSUMPARAM" CHAR(1) DEFAULT 'N', 
	"ISONSITEPARAM" CHAR(1) DEFAULT 'N', 
	"MOLMASSE" NUMBER(10,2), 
	"COLOR" NUMBER(10,0), 
	"KAT1" CHAR(1) DEFAULT 'N', 
	"KAT2" CHAR(1) DEFAULT 'N', 
	"KAT3" CHAR(1) DEFAULT 'N', 
	"KAT4" CHAR(1) DEFAULT 'N', 
	"KAT5" CHAR(1) DEFAULT 'N', 
	"KAT6" CHAR(1) DEFAULT 'N', 
	"KAT7" CHAR(1) DEFAULT 'N', 
	"KAT8" CHAR(1) DEFAULT 'N', 
	"KAT9" CHAR(1) DEFAULT 'N', 
	"KAT10" CHAR(1) DEFAULT 'N', 
	"BEMERKUNGPARAMETER" VARCHAR2(250), 
	"ALLOWNEGATIVE" CHAR(1) DEFAULT 'N', 
	"GRENZWERT1" NUMBER(12,4), 
	"GRENZWERT1NAME" VARCHAR2(50), 
	"GRENZWERT2" NUMBER(12,4), 
	"GRENZWERT2NAME" VARCHAR2(50), 
	"GRENZWERT3" NUMBER(12,4), 
	"GRENZWERT3NAME" VARCHAR2(50), 
	"GRENZWERT4" NUMBER(12,4), 
	"GRENZWERT4NAME" VARCHAR2(50), 
	"GRENZWERT5" NUMBER(12,4), 
	"GRENZWERT5NAME" VARCHAR2(50), 
	"GRENZWERT6" NUMBER(12,4), 
	"GRENZWERT6NAME" VARCHAR2(50), 
	"GRENZWERT7" NUMBER(12,4), 
	"GRENZWERT7NAME" VARCHAR2(50), 
	"GRENZWERT8" NUMBER(12,4), 
	"GRENZWERT8NAME" VARCHAR2(50), 
	"STDGRENZWERT" CHAR(1), 
	"SEQNR" NUMBER(10,0), 
	"LOWERBOUND" NUMBER(12,4), 
	"UPPERBOUND" NUMBER(12,4), 
	"WEB_CAT" VARCHAR2(2), 
	"STDMETHOD_ID" NUMBER(10,0), 
	"DETECTLIMITWATER" NUMBER(12,5), 
	"DETECTLIMITSOIL" NUMBER(12,5), 
	"DETECTLIMITAQSOL" NUMBER(12,5), 
	"DETECTLIMITAIR" NUMBER(12,5), 
	"DECIMALPLACES" NUMBER(10,0), 
	"VALENCENO" NUMBER(10,0), 
	"PARAMGROUP" NVARCHAR2(1), 
	"SYMBOL" NUMBER(10,0), 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWTRANSFERDATE" DATE, 
	"HASUPPERLIMIT" NCHAR(1) DEFAULT '+'
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PARAMET_PK" ON "GWBASE"."GWB_PARAMET" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PARAMET" ADD CONSTRAINT "GWB_PARAMET_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PARAMET_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_PARAMET" ADD CONSTRAINT "GWB_PARAM_METHODS_FK" FOREIGN KEY ("STDMETHOD_ID")
	  REFERENCES "GWBASE"."GWB_ANALYMETHODS" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PARAMET_IDX1" ON "GWBASE"."GWB_PARAMET" ("PARAMETERKUERZEL") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PARAMET_PK" ON "GWBASE"."GWB_PARAMET" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PARAMLISTS" 
   (	"ID" NUMBER(10,0), 
	"LISTNAME" VARCHAR2(100), 
	"PARAMIDS" CLOB
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("PARAMIDS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PARAMLISTS_PK" ON "GWBASE"."GWB_PARAMLISTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PARAMLISTS" ADD CONSTRAINT "GWB_PARAMLISTS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PARAMLISTS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PARAMLISTS_PK" ON "GWBASE"."GWB_PARAMLISTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076077C00003$$" ON "GWBASE"."GWB_PARAMLISTS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_PARAM_VALUECLASSES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PARAM_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MEDIUM" NUMBER(10,0) NOT NULL ENABLE, 
	"CLASSVALUE" NUMBER(12,4) NOT NULL ENABLE, 
	"CLASSCOLOR" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PARAM_VALUECLASSES_PK" ON "GWBASE"."GWB_PARAM_VALUECLASSES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PARAM_VALUECLASSES" ADD CONSTRAINT "GWB_PARAM_VALUECLASSES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PARAM_VALUECLASSES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_PARAM_VALUECLASSES" ADD CONSTRAINT "GWB_PVC_PARAM_FK" FOREIGN KEY ("PARAM_ID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PARAM_VALUECLASSES_IDX1" ON "GWBASE"."GWB_PARAM_VALUECLASSES" ("PARAM_ID", "MEDIUM", "CLASSVALUE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PARAM_VALUECLASSES_PK" ON "GWBASE"."GWB_PARAM_VALUECLASSES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PIPEMATERIALCAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PIPEMATERIALCAT_PK" ON "GWBASE"."GWB_PIPEMATERIALCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PIPEMATERIALCAT" ADD CONSTRAINT "GWB_PIPEMATERIALCAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PIPEMATERIALCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PIPEMATERIALCAT_IDX1" ON "GWBASE"."GWB_PIPEMATERIALCAT" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PIPEMATERIALCAT_PK" ON "GWBASE"."GWB_PIPEMATERIALCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PIPES" 
   (	"ID" NUMBER(10,0), 
	"PIPENAME" NVARCHAR2(50)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PIPES_PK" ON "GWBASE"."GWB_PIPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PIPES" ADD CONSTRAINT "GWB_PIPES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PIPES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PIPES_IX1" ON "GWBASE"."GWB_PIPES" ("PIPENAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PIPES_PK" ON "GWBASE"."GWB_PIPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PIPETYPECAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PIPETYPECAT_PK" ON "GWBASE"."GWB_PIPETYPECAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PIPETYPECAT" ADD CONSTRAINT "GWB_PIPETYPECAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PIPETYPECAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PIPETYPECAT_IDX1" ON "GWBASE"."GWB_PIPETYPECAT" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PIPETYPECAT_PK" ON "GWBASE"."GWB_PIPETYPECAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PROBEN" 
   (	"DATUMID" NUMBER(10,0), 
	"PROBENNR" VARCHAR2(20), 
	"PROBENNEHMER" VARCHAR2(20), 
	"WETTER" NVARCHAR2(50), 
	"LABOR" NVARCHAR2(100), 
	"ENTNAHMETIEFE" NUMBER(7,3), 
	"ENTNAHMETIEFEBIS" NUMBER(7,3), 
	"FOERDERRATE" VARCHAR2(10), 
	"FOERDERDAUER" VARCHAR2(10), 
	"FOERDERGERAET" VARCHAR2(50), 
	"GERAETETYP" VARCHAR2(50), 
	"PROBENART" NVARCHAR2(50), 
	"TRUEBUNG" NVARCHAR2(50), 
	"FARBE" NVARCHAR2(50), 
	"GERUCH" NVARCHAR2(50), 
	"BODENSATZ" NVARCHAR2(50), 
	"UPROGRAMM" NUMBER(10,0), 
	"PROGRAMMEINGEGEBEN" CHAR(1) DEFAULT 'N', 
	"SAMPLEDESCRIPTION" VARCHAR2(100), 
	"LEVELBEFORE" NUMBER(7,3), 
	"LEVELAFTER" NUMBER(7,3), 
	"LEVELCONST" CHAR(1), 
	"LOCKED" CHAR(1), 
	"TASTE" NVARCHAR2(50), 
	"CREATEDBY" NUMBER(10,0), 
	"USERFIELD1" VARCHAR2(50), 
	"USERFIELD2" VARCHAR2(50), 
	"USERFIELD3" VARCHAR2(50), 
	"USERFIELD4" VARCHAR2(50), 
	"USERFIELD5" VARCHAR2(50), 
	"REASON_ID" NUMBER(10,0), 
	"MATERIAL_ID" NUMBER(10,0), 
	"HARDNESS" NVARCHAR2(50), 
	"SUMCATIONS" NUMBER(10,4), 
	"SUMANIONS" NUMBER(10,4), 
	"SUMCATIONSCEQ" NUMBER(10,4), 
	"SUMANIONSCEQ" NUMBER(10,4)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PROBEN_PK" ON "GWBASE"."GWB_PROBEN" ("DATUMID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PROBEN" ADD CONSTRAINT "GWB_PROBEN_PK" PRIMARY KEY ("DATUMID")
  USING INDEX "GWBASE"."GWB_PROBEN_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_PROBEN" ADD CONSTRAINT "GWB_PROBEN_MEASDATE_FK" FOREIGN KEY ("DATUMID")
	  REFERENCES "GWBASE"."GWB_MEASDATE" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_PROBEN" ADD CONSTRAINT "GWB_PROBEN_REASON_FK" FOREIGN KEY ("REASON_ID")
	  REFERENCES "GWBASE"."GWB_SAMPLINGREASONS" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PROBEN_PK" ON "GWBASE"."GWB_PROBEN" ("DATUMID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PROGGROUPS" 
   (	"ID" NUMBER(10,0), 
	"GROUPNAME" VARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PROGGROUPS_PK" ON "GWBASE"."GWB_PROGGROUPS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PROGGROUPS" ADD CONSTRAINT "GWB_PROGGROUPS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PROGGROUPS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PROGGROUPS_PK" ON "GWBASE"."GWB_PROGGROUPS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PROGGROUPS_PROGS" 
   (	"GROUP_ID" NUMBER(10,0), 
	"PROG_ID" NUMBER(10,0), 
	"SEQNR" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PROGGROUPS_PROGS_PK" ON "GWBASE"."GWB_PROGGROUPS_PROGS" ("GROUP_ID", "PROG_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PROGGROUPS_PROGS" ADD CONSTRAINT "GWB_PROGGROUPS_PROGS_PK" PRIMARY KEY ("GROUP_ID", "PROG_ID")
  USING INDEX "GWBASE"."GWB_PROGGROUPS_PROGS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_PROGGROUPS_PROGS" ADD CONSTRAINT "GWB_PRGRPR_GROUP_FK" FOREIGN KEY ("GROUP_ID")
	  REFERENCES "GWBASE"."GWB_PROGGROUPS" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_PROGGROUPS_PROGS" ADD CONSTRAINT "GWB_PRGRPR_PROG_FK" FOREIGN KEY ("PROG_ID")
	  REFERENCES "GWBASE"."GWB_UKAT" ("KATALOGNR") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PROGGROUPS_PROGS_PK" ON "GWBASE"."GWB_PROGGROUPS_PROGS" ("GROUP_ID", "PROG_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PROG_PARAM" 
   (	"PROG_ID" NUMBER(10,0), 
	"SEQNR" NUMBER(10,0), 
	"PARAM_ID" NUMBER(10,0), 
	"DETECTLIMIT" NUMBER(12,4), 
	"PARAMUNIT" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PROGPARAM_PK" ON "GWBASE"."GWB_PROG_PARAM" ("PROG_ID", "SEQNR", "PARAM_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PROG_PARAM" ADD CONSTRAINT "GWB_PROGPARAM_PK" PRIMARY KEY ("PROG_ID", "SEQNR", "PARAM_ID")
  USING INDEX "GWBASE"."GWB_PROGPARAM_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_PROG_PARAM" ADD CONSTRAINT "GWB_PROGPARAM_PARAMETER_FK" FOREIGN KEY ("PARAM_ID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_PROG_PARAM" ADD CONSTRAINT "GWB_PROGPARAM_PROG_FK" FOREIGN KEY ("PROG_ID")
	  REFERENCES "GWBASE"."GWB_UKAT" ("KATALOGNR") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PROGPARAM_PK" ON "GWBASE"."GWB_PROG_PARAM" ("PROG_ID", "SEQNR", "PARAM_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PROJECTS" 
   (	"ID" NUMBER(10,0), 
	"PROJECTDESCR" VARCHAR2(50), 
	"PROJECTCOMMENT" VARCHAR2(50), 
	"REFERENCENO_1" NVARCHAR2(50), 
	"REFERENCENO_2" NVARCHAR2(50), 
	"REFERENCENO_3" NVARCHAR2(50), 
	"REFERENCENO_4" NVARCHAR2(50), 
	"REFERENCENO_5" NVARCHAR2(50), 
	"TEXT_1" NVARCHAR2(100), 
	"LOGICAL_1" NVARCHAR2(1) DEFAULT 'N', 
	"TEXT_2" NVARCHAR2(100), 
	"LOGICAL_2" NVARCHAR2(1) DEFAULT 'N', 
	"TEXT_3" NVARCHAR2(100), 
	"LOGICAL_3" NVARCHAR2(1) DEFAULT 'N', 
	"TEXT_4" NVARCHAR2(100), 
	"LOGICAL_4" NVARCHAR2(1) DEFAULT 'N', 
	"TEXT_5" NVARCHAR2(100), 
	"LOGICAL_5" NVARCHAR2(1) DEFAULT 'N', 
	"OWNER_ID" NUMBER(10,0), 
	"EPSG_CODE" NVARCHAR2(20), 
	"NAD_GRID" NVARCHAR2(200), 
	"GROUP_ID" NUMBER(10,0), 
	"ISDEFAULTGROUP" NUMBER(10,0), 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWTRANSFERDATE" DATE, 
	"STATIONSUNIQUE" NUMBER(10,0) DEFAULT 0
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PROJECTS_PK" ON "GWBASE"."GWB_PROJECTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PROJECTS" ADD CONSTRAINT "GWB_PROJECTS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PROJECTS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PROJECTS_IDX1" ON "GWBASE"."GWB_PROJECTS" ("PROJECTDESCR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PROJECTS_IDX2" ON "GWBASE"."GWB_PROJECTS" ("PROJECTDESCR", "OWNER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PROJECTS_PK" ON "GWBASE"."GWB_PROJECTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PROJECTSETTINGS" 
   (	"ID" NUMBER(10,0), 
	"PROJECTSETTINGS" CLOB, 
	"LASTOPENDATE" DATE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("PROJECTSETTINGS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
;

CREATE TABLE "GWBASE"."GWB_PROJECTS_USERS" 
   (	"PU_PROJECTID" NUMBER(10,0), 
	"PU_LOGINNAME" VARCHAR2(20), 
	"PU_PRIV_WELLS" NUMBER(4,0), 
	"PU_PRIV_LEVEL" NUMBER(4,0), 
	"PU_PRIV_ANALYSIS" NUMBER(4,0), 
	"PU_PRIV_DISCHARGE" NUMBER(4,0), 
	"PU_PRIV_RAINFALL" NUMBER(4,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PROJECTSUSERS_PK" ON "GWBASE"."GWB_PROJECTS_USERS" ("PU_PROJECTID", "PU_LOGINNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PROJECTS_USERS" ADD CONSTRAINT "GWB_PROJECTSUSERS_PK" PRIMARY KEY ("PU_PROJECTID", "PU_LOGINNAME")
  USING INDEX "GWBASE"."GWB_PROJECTSUSERS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_PROJECTS_USERS" ADD CONSTRAINT "GWB_PROJECTSUSERS_PROJECTS_FK" FOREIGN KEY ("PU_PROJECTID")
	  REFERENCES "GWBASE"."GWB_PROJECTS" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_PROJECTS_USERS" ADD CONSTRAINT "GWB_PROJECTSUSERS_USERS_FK" FOREIGN KEY ("PU_LOGINNAME")
	  REFERENCES "GWBASE"."GWB_USERS" ("US_LOGINNAME") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PROJECTSUSERS_PK" ON "GWBASE"."GWB_PROJECTS_USERS" ("PU_PROJECTID", "PU_LOGINNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PUMPEN" 
   (	"PUMPENTYP" VARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PUMPEN_PK" ON "GWBASE"."GWB_PUMPEN" ("PUMPENTYP") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PUMPEN" ADD CONSTRAINT "GWB_PUMPEN_PK" PRIMARY KEY ("PUMPENTYP")
  USING INDEX "GWBASE"."GWB_PUMPEN_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PUMPEN_PK" ON "GWBASE"."GWB_PUMPEN" ("PUMPENTYP") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_PUMP_DATA" 
   (	"ID" NUMBER(10,0), 
	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"EQUIP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"DATEAV" DATE, 
	"HEAD_VOL" NUMBER(10,2), 
	"HEAD_CURR" NUMBER(10,2), 
	"VOL_CURR" NUMBER(10,2), 
	"DATACOUNT" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PUMP_DATA_PK" ON "GWBASE"."GWB_PUMP_DATA" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_PUMP_DATA" ADD CONSTRAINT "GWB_PUMP_DATA_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_PUMP_DATA_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_PUMP_DATA" ADD CONSTRAINT "GWB_PUMPDATA_EQUIP_FK" FOREIGN KEY ("EQUIP_ID")
	  REFERENCES "GWBASE"."GWB_TECHEQUIPMENT" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_PUMP_DATA" ADD CONSTRAINT "GWB_PUMPDATA_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PUMP_DATA_PK" ON "GWBASE"."GWB_PUMP_DATA" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_RAINFALL" 
   (	"WELL_ID" NUMBER(10,0), 
	"DATE1" DATE, 
	"DATE2" DATE, 
	"RAINFALL" NUMBER(5,2), 
	"IMPORT_ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_RAINFALL_PK" ON "GWBASE"."GWB_RAINFALL" ("WELL_ID", "DATE1") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_RAINFALL" ADD CONSTRAINT "GWB_RAINFALL_PK" PRIMARY KEY ("WELL_ID", "DATE1")
  USING INDEX "GWBASE"."GWB_RAINFALL_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_RAINFALL" ADD CONSTRAINT "GWB_RAINFALL_WELLS_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_RAINFALL_PK" ON "GWBASE"."GWB_RAINFALL" ("WELL_ID", "DATE1") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_RATES" 
   (	"MESSTELLENID" NUMBER(10,0), 
	"DATUM1" DATE, 
	"DATUM2" DATE, 
	"QWERT" NUMBER(10,4), 
	"OPHOURS" NUMBER(6,2), 
	"IMPORT_ID" NUMBER(10,0), 
	"CURRENTREADING" NUMBER(10,0), 
	"COMMENTTEXT" VARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_RATES_PK" ON "GWBASE"."GWB_RATES" ("MESSTELLENID", "DATUM1") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_RATES" ADD CONSTRAINT "GWB_RATES_PK" PRIMARY KEY ("MESSTELLENID", "DATUM1")
  USING INDEX "GWBASE"."GWB_RATES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_RATES" ADD CONSTRAINT "GWB_RATES_WELLS_FK" FOREIGN KEY ("MESSTELLENID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_RATES_PK" ON "GWBASE"."GWB_RATES" ("MESSTELLENID", "DATUM1") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_REPORTGROUPS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"GROUPNAME" NVARCHAR2(100) NOT NULL ENABLE, 
	"TITLE1" NVARCHAR2(50), 
	"TITLE2" NVARCHAR2(50), 
	"TITLE3" NVARCHAR2(50), 
	"TITLE4" NVARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_PK" ON "GWBASE"."GWB_REPORTGROUPS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_REPORTGROUPS" ADD CONSTRAINT "GWB_REPORTGROUPS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_REPORTGROUPS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_PK" ON "GWBASE"."GWB_REPORTGROUPS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_IDX1" ON "GWBASE"."GWB_REPORTGROUPS" ("GROUPNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS" 
   (	"GROUP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PARAMGROUP_ID" NUMBER(10,0) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS_PK" ON "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS" ("GROUP_ID", "PARAMGROUP_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS" ADD CONSTRAINT "GWB_REPORTGROUPS_PARAMGROUPS_PK" PRIMARY KEY ("GROUP_ID", "PARAMGROUP_ID")
  USING INDEX "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS" ADD CONSTRAINT "GWB_RGPG_GROUP_FK" FOREIGN KEY ("GROUP_ID")
	  REFERENCES "GWBASE"."GWB_REPORTGROUPS" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS" ADD CONSTRAINT "GWB_RGPG_PARAMGROUP_FK" FOREIGN KEY ("PARAMGROUP_ID")
	  REFERENCES "GWBASE"."GWB_STOFFKL" ("CLASS_ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS_PK" ON "GWBASE"."GWB_REPORTGROUPS_PARAMGROUPS" ("GROUP_ID", "PARAMGROUP_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_REPORTGROUPS_PARAMS" 
   (	"GROUP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PARAM_ID" NUMBER(10,0) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_PARAMS_PK" ON "GWBASE"."GWB_REPORTGROUPS_PARAMS" ("GROUP_ID", "PARAM_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_PARAMS" ADD CONSTRAINT "GWB_REPORTGROUPS_PARAMS_PK" PRIMARY KEY ("GROUP_ID", "PARAM_ID")
  USING INDEX "GWBASE"."GWB_REPORTGROUPS_PARAMS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_PARAMS" ADD CONSTRAINT "GWB_RGP_GROUP_FK" FOREIGN KEY ("GROUP_ID")
	  REFERENCES "GWBASE"."GWB_REPORTGROUPS" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_PARAMS" ADD CONSTRAINT "GWB_RGP_PARAM_FK" FOREIGN KEY ("PARAM_ID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_PARAMS_PK" ON "GWBASE"."GWB_REPORTGROUPS_PARAMS" ("GROUP_ID", "PARAM_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_REPORTGROUPS_STATIONS" 
   (	"GROUP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STATION_ID" NUMBER(10,0) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_STATIONS_PK" ON "GWBASE"."GWB_REPORTGROUPS_STATIONS" ("GROUP_ID", "STATION_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_STATIONS" ADD CONSTRAINT "GWB_REPORTGROUPS_STATIONS_PK" PRIMARY KEY ("GROUP_ID", "STATION_ID")
  USING INDEX "GWBASE"."GWB_REPORTGROUPS_STATIONS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_STATIONS" ADD CONSTRAINT "GWB_RGS_GROUP_FK" FOREIGN KEY ("GROUP_ID")
	  REFERENCES "GWBASE"."GWB_REPORTGROUPS" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_STATIONS" ADD CONSTRAINT "GWB_RGS_STATION_FK" FOREIGN KEY ("STATION_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_STATIONS_PK" ON "GWBASE"."GWB_REPORTGROUPS_STATIONS" ("GROUP_ID", "STATION_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_REPORTGROUPS_TEMPLATES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"GROUP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"REPORTTEMPLATE" NVARCHAR2(255) NOT NULL ENABLE, 
	"SEQNO" NUMBER(10,0) NOT NULL ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_TEMPLATES_PK" ON "GWBASE"."GWB_REPORTGROUPS_TEMPLATES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_TEMPLATES" ADD CONSTRAINT "GWB_REPORTGROUPS_TEMPLATES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_REPORTGROUPS_TEMPLATES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_REPORTGROUPS_TEMPLATES" ADD CONSTRAINT "GWB_RGT_GROUP_FK" FOREIGN KEY ("GROUP_ID")
	  REFERENCES "GWBASE"."GWB_REPORTGROUPS" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_REPORTGROUPS_TEMPLATES_PK" ON "GWBASE"."GWB_REPORTGROUPS_TEMPLATES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLECALENDAR" 
   (	"SAMPLEDATE" NUMBER(10,0), 
	"WELL_ID" NUMBER(10,0), 
	"PROGGROUP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"DONE" CHAR(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLECALEDAR_PK" ON "GWBASE"."GWB_SAMPLECALENDAR" ("SAMPLEDATE", "WELL_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLECALENDAR" ADD CONSTRAINT "GWB_SAMPLECALEDAR_PK" PRIMARY KEY ("SAMPLEDATE", "WELL_ID")
  USING INDEX "GWBASE"."GWB_SAMPLECALEDAR_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_SAMPLECALENDAR" ADD CONSTRAINT "GWB_SAMPLECALENDAR_PRGR_FK" FOREIGN KEY ("PROGGROUP_ID")
	  REFERENCES "GWBASE"."GWB_PROGGROUPS" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_SAMPLECALENDAR" ADD CONSTRAINT "GWB_SAMPLECALENDAR_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLECALEDAR_PK" ON "GWBASE"."GWB_SAMPLECALENDAR" ("SAMPLEDATE", "WELL_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLECOLOR" 
   (	"COLOR" VARCHAR2(20), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLECOLOR_PK" ON "GWBASE"."GWB_SAMPLECOLOR" ("COLOR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLECOLOR" ADD CONSTRAINT "GWB_SAMPLECOLOR_PK" PRIMARY KEY ("COLOR")
  USING INDEX "GWBASE"."GWB_SAMPLECOLOR_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLECOLOR_PK" ON "GWBASE"."GWB_SAMPLECOLOR" ("COLOR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLEMATERIAL" 
   (	"ID" NUMBER(10,0), 
	"SHORTNAME" VARCHAR2(24), 
	"LONGNAME" VARCHAR2(80)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLEMATERIAL_PK" ON "GWBASE"."GWB_SAMPLEMATERIAL" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLEMATERIAL" ADD CONSTRAINT "GWB_SAMPLEMATERIAL_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SAMPLEMATERIAL_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLEMATERIAL_PK" ON "GWBASE"."GWB_SAMPLEMATERIAL" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLESEDIMENT" 
   (	"SEDIMENT" NVARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLESEDIMENT_PK" ON "GWBASE"."GWB_SAMPLESEDIMENT" ("SEDIMENT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLESEDIMENT" ADD CONSTRAINT "GWB_SAMPLESEDIMENT_PK" PRIMARY KEY ("SEDIMENT")
  USING INDEX "GWBASE"."GWB_SAMPLESEDIMENT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLESEDIMENT_PK" ON "GWBASE"."GWB_SAMPLESEDIMENT" ("SEDIMENT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLESMELL" 
   (	"SMELL" NVARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLESMELL_PK" ON "GWBASE"."GWB_SAMPLESMELL" ("SMELL") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLESMELL" ADD CONSTRAINT "GWB_SAMPLESMELL_PK" PRIMARY KEY ("SMELL")
  USING INDEX "GWBASE"."GWB_SAMPLESMELL_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLESMELL_PK" ON "GWBASE"."GWB_SAMPLESMELL" ("SMELL") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLES_PROGS" 
   (	"SAMPLE_ID" NUMBER(10,0), 
	"PROG_ID" NUMBER(10,0), 
	"SEQNR" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLESPROGS_PK" ON "GWBASE"."GWB_SAMPLES_PROGS" ("SAMPLE_ID", "PROG_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLES_PROGS" ADD CONSTRAINT "GWB_SAMPLESPROGS_PK" PRIMARY KEY ("SAMPLE_ID", "PROG_ID")
  USING INDEX "GWBASE"."GWB_SAMPLESPROGS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_SAMPLES_PROGS" ADD CONSTRAINT "GWB_SAMPLESPROGS_PROG_FK" FOREIGN KEY ("PROG_ID")
	  REFERENCES "GWBASE"."GWB_UKAT" ("KATALOGNR") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_SAMPLES_PROGS" ADD CONSTRAINT "GWB_SAMPLESPROGS_SAMPLE_FK" FOREIGN KEY ("SAMPLE_ID")
	  REFERENCES "GWBASE"."GWB_MEASDATE" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLESPROGS_PK" ON "GWBASE"."GWB_SAMPLES_PROGS" ("SAMPLE_ID", "PROG_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLETURBIDITY" 
   (	"TURBIDITY" NVARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLETURBIDITY_PK" ON "GWBASE"."GWB_SAMPLETURBIDITY" ("TURBIDITY") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLETURBIDITY" ADD CONSTRAINT "GWB_SAMPLETURBIDITY_PK" PRIMARY KEY ("TURBIDITY")
  USING INDEX "GWBASE"."GWB_SAMPLETURBIDITY_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLETURBIDITY_PK" ON "GWBASE"."GWB_SAMPLETURBIDITY" ("TURBIDITY") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLETYPE" 
   (	"SAMPLETYPE" NVARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLETYPE_PK" ON "GWBASE"."GWB_SAMPLETYPE" ("SAMPLETYPE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLETYPE" ADD CONSTRAINT "GWB_SAMPLETYPE_PK" PRIMARY KEY ("SAMPLETYPE")
  USING INDEX "GWBASE"."GWB_SAMPLETYPE_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLETYPE_PK" ON "GWBASE"."GWB_SAMPLETYPE" ("SAMPLETYPE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLEWEATHER" 
   (	"WEATHER" NVARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLEWEATHER_PK" ON "GWBASE"."GWB_SAMPLEWEATHER" ("WEATHER") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLEWEATHER" ADD CONSTRAINT "GWB_SAMPLEWEATHER_PK" PRIMARY KEY ("WEATHER")
  USING INDEX "GWBASE"."GWB_SAMPLEWEATHER_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLEWEATHER_PK" ON "GWBASE"."GWB_SAMPLEWEATHER" ("WEATHER") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SAMPLINGREASONS" 
   (	"ID" NUMBER(10,0), 
	"REASON" VARCHAR2(50), 
	"KEYNR" VARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLINGREASONS_PK" ON "GWBASE"."GWB_SAMPLINGREASONS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SAMPLINGREASONS" ADD CONSTRAINT "GWB_SAMPLINGREASONS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SAMPLINGREASONS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SAMPLINGREASONS_PK" ON "GWBASE"."GWB_SAMPLINGREASONS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SELECTIONS" 
   (	"ID" NUMBER(10,0), 
	"OWNER" VARCHAR2(20), 
	"CONDNAME" VARCHAR2(255), 
	"PROJCOND" VARCHAR2(255), 
	"WELLCOND" CLOB, 
	"PROGCOND" VARCHAR2(255)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("WELLCOND") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SELECTIONS_PK" ON "GWBASE"."GWB_SELECTIONS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SELECTIONS" ADD CONSTRAINT "GWB_SELECTIONS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SELECTIONS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SELECTIONS_PK" ON "GWBASE"."GWB_SELECTIONS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076112C00005$$" ON "GWBASE"."GWB_SELECTIONS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_SENSORDEPTH" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"SENSORDEPTH" NUMBER(8,2) NOT NULL ENABLE, 
	"SENSORDATE" DATE NOT NULL ENABLE, 
	"COMMENTTEXT" NVARCHAR2(100), 
	"MTYPE" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SENSORDEPTH_PK" ON "GWBASE"."GWB_SENSORDEPTH" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SENSORDEPTH" ADD CONSTRAINT "GWB_SENSORDEPTH_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SENSORDEPTH_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_SENSORDEPTH" ADD CONSTRAINT "GWB_SENSORDEPTH_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SENSORDEPTH_PK" ON "GWBASE"."GWB_SENSORDEPTH" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SITEOWNERS" 
   (	"ID" NUMBER(10,0), 
	"NAME" VARCHAR2(50), 
	"ZIP" VARCHAR2(10), 
	"STREET" VARCHAR2(50), 
	"TOWN" VARCHAR2(50), 
	"TEL" VARCHAR2(20)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SITEOWNERS_PK" ON "GWBASE"."GWB_SITEOWNERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SITEOWNERS" ADD CONSTRAINT "GWB_SITEOWNERS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SITEOWNERS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SITEOWNERS_PK" ON "GWBASE"."GWB_SITEOWNERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SPEC_YIELD" 
   (	"ID" NUMBER(10,0), 
	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MDATE" DATE, 
	"DRAWDOWN" NUMBER(8,2), 
	"FLOW" NUMBER(8,2), 
	"COMMENTTEXT" VARCHAR2(50), 
	"MDATE_STATIC" DATE, 
	"STATIC_LEVEL" NUMBER(10,2), 
	"PRESSURE" NUMBER(10,2), 
	"POWER" NUMBER(10,2)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SPEC_YIELD_PK" ON "GWBASE"."GWB_SPEC_YIELD" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SPEC_YIELD" ADD CONSTRAINT "GWB_SPEC_YIELD_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SPEC_YIELD_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_SPEC_YIELD" ADD CONSTRAINT "GWB_SPEC_YIELD_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SPEC_YIELD_IX1" ON "GWBASE"."GWB_SPEC_YIELD" ("WELL_ID", "MDATE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SPEC_YIELD_PK" ON "GWBASE"."GWB_SPEC_YIELD" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SQLRECHERCHE" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ART" VARCHAR2(1), 
	"BEZEICHNUNG" VARCHAR2(64), 
	"BESCHREIBUNG" VARCHAR2(128), 
	"GRUPPE" NUMBER(10,0), 
	"KMSALLE" VARCHAR2(1), 
	"KMSTEILGEBIET" NUMBER(10,0), 
	"KMSROUTE" NUMBER(10,0), 
	"KMSHWSTOCKW" NUMBER(10,0), 
	"KMSGEOLEINHEIT" NUMBER(10,0), 
	"KWSWASSERSTANDJN" VARCHAR2(1), 
	"KWSPERSON" NUMBER(10,0), 
	"KWSKENNUNG" VARCHAR2(1), 
	"KWSATTRIBUT" NUMBER(10,0), 
	"KWSHINWEISJN" VARCHAR2(1), 
	"KWSMITOHNEWERT" VARCHAR2(1), 
	"KWSRELATION" VARCHAR2(1), 
	"KWSWERT" NUMBER(10,2), 
	"KWSBEZUG" VARCHAR2(1), 
	"KWSWSUNTERFILTERUK" VARCHAR2(1), 
	"KWSGELOTETETIEFE" VARCHAR2(1), 
	"KPBPROBEJN" VARCHAR2(1), 
	"KPBERLEDIGTJN" VARCHAR2(1), 
	"KPBPROBENNEHMER" VARCHAR2(64), 
	"KPBUPROGRAMM" NUMBER(10,0), 
	"KAYANALYSEJN" VARCHAR2(1), 
	"KAYMITPARAM" VARCHAR2(1), 
	"KAYPARAMANZAHL" VARCHAR2(1), 
	"KAYMITOHNEWERT" VARCHAR2(1), 
	"KAYPARAMETER" NUMBER(10,0), 
	"KAYRELATION" VARCHAR2(1), 
	"KAYWERT" NUMBER(10,2), 
	"KAYLABOR" NUMBER(10,0), 
	"KDTDATUMJN" VARCHAR2(1), 
	"VISCOLLAGE" VARCHAR2(1), 
	"VISCOLANALYMETHOD" VARCHAR2(1)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SQLRECHERCHE_PK" ON "GWBASE"."GWB_SQLRECHERCHE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SQLRECHERCHE" ADD CONSTRAINT "GWB_SQLRECHERCHE_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SQLRECHERCHE_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SQLRECHERCHE_PK" ON "GWBASE"."GWB_SQLRECHERCHE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STATIONREPORTS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"DESCRIPTION" NVARCHAR2(50), 
	"SORTORDER" NUMBER(10,0), 
	"PARAMETER_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STN1_ID" NUMBER(10,0), 
	"STN2_ID" NUMBER(10,0), 
	"STN3_ID" NUMBER(10,0), 
	"STN4_ID" NUMBER(10,0), 
	"STN5_ID" NUMBER(10,0), 
	"STN6_ID" NUMBER(10,0), 
	"STN7_ID" NUMBER(10,0), 
	"STN8_ID" NUMBER(10,0), 
	"STN9_ID" NUMBER(10,0), 
	"STN10_ID" NUMBER(10,0), 
	"THRESHOLDTEXT" NVARCHAR2(50), 
	"THRESHOLDVALUE" NUMBER(10,2)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STATIONREPORTS_PK" ON "GWBASE"."GWB_STATIONREPORTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STATIONREPORTS" ADD CONSTRAINT "GWB_STATIONREPORTS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_STATIONREPORTS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_STATIONREPORTS_PK" ON "GWBASE"."GWB_STATIONREPORTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STNFLOWDEVICEHISTORY" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STATION_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"FLOWDEVICE_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"FLOWDEVICEDATE" DATE NOT NULL ENABLE, 
	"FLOWDEVICECOMMENTTEXT" NVARCHAR2(100)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STNFLOWDEVICEHISTORY_PK" ON "GWBASE"."GWB_STNFLOWDEVICEHISTORY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STNFLOWDEVICEHISTORY" ADD CONSTRAINT "GWB_STNFLOWDEVICEHISTORY_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_STNFLOWDEVICEHISTORY_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_STNFLOWDEVICEHISTORY" ADD CONSTRAINT "GWB_STNFLOWDEVICEHISTORY_STN_FK" FOREIGN KEY ("STATION_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_STNFLOWDEVICEHISTORY" ADD CONSTRAINT "GWB_STNFLOWDEVICEHISTORY_DEVICE_FK" FOREIGN KEY ("FLOWDEVICE_ID")
	  REFERENCES "GWBASE"."GWB_FLOWMEASUREMENTCAT" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_STNFLOWDEVICEHISTORY_IX1" ON "GWBASE"."GWB_STNFLOWDEVICEHISTORY" ("FLOWDEVICE_ID", "FLOWDEVICEDATE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STNFLOWDEVICEHISTORY_PK" ON "GWBASE"."GWB_STNFLOWDEVICEHISTORY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STOFFKL" 
   (	"CLASS_ID" NUMBER(10,0), 
	"NAME" VARCHAR2(50), 
	"CLASSTYPE" NUMBER(10,0), 
	"KAT1" CHAR(1) DEFAULT 'N', 
	"KAT2" CHAR(1) DEFAULT 'N', 
	"KAT3" CHAR(1) DEFAULT 'N', 
	"KAT4" CHAR(1) DEFAULT 'N', 
	"KAT5" CHAR(1) DEFAULT 'N', 
	"KAT6" CHAR(1) DEFAULT 'N', 
	"KAT7" CHAR(1) DEFAULT 'N', 
	"KAT8" CHAR(1) DEFAULT 'N', 
	"KAT9" CHAR(1) DEFAULT 'N', 
	"KAT10" CHAR(1) DEFAULT 'N', 
	"STANDARDEINHEIT" VARCHAR2(10), 
	"STANDARDUNITSOIL" VARCHAR2(10), 
	"STANDARDUNITELUAT" VARCHAR2(10), 
	"STANDARDUNITAIR" VARCHAR2(10), 
	"SUMPARAM_ID" NUMBER(10,0), 
	"COLOR" NUMBER(10,0), 
	"SUMCALCONCOMPLETE" CHAR(1) DEFAULT 'N'
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STOFFKL_PK" ON "GWBASE"."GWB_STOFFKL" ("CLASS_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STOFFKL" ADD CONSTRAINT "GWB_STOFFKL_PK" PRIMARY KEY ("CLASS_ID")
  USING INDEX "GWBASE"."GWB_STOFFKL_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_STOFFKL" ADD CONSTRAINT "GWB_STOFFKL_PARAMET_FK" FOREIGN KEY ("SUMPARAM_ID")
	  REFERENCES "GWBASE"."GWB_PARAMET" ("ID") ENABLE;

CREATE INDEX "GWBASE"."GWB_STOFFKL_IDX1" ON "GWBASE"."GWB_STOFFKL" ("NAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STOFFKL_PK" ON "GWBASE"."GWB_STOFFKL" ("CLASS_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STOREDRIVERNETS" 
   (	"ID" NUMBER(10,0), 
	"RIVERNETNAME" VARCHAR2(50)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SRNET_PK" ON "GWBASE"."GWB_STOREDRIVERNETS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STOREDRIVERNETS" ADD CONSTRAINT "GWB_SRNET_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SRNET_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SRNET_PK" ON "GWBASE"."GWB_STOREDRIVERNETS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STOREDRIVERNET_AQUIFERS" 
   (	"STOREDRIVERNET_ID" NUMBER(10,0), 
	"AQUIFER_ID" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SRNETAQUI_PK" ON "GWBASE"."GWB_STOREDRIVERNET_AQUIFERS" ("STOREDRIVERNET_ID", "AQUIFER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STOREDRIVERNET_AQUIFERS" ADD CONSTRAINT "GWB_SRNETAQUI_PK" PRIMARY KEY ("STOREDRIVERNET_ID", "AQUIFER_ID")
  USING INDEX "GWBASE"."GWB_SRNETAQUI_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_STOREDRIVERNET_AQUIFERS" ADD CONSTRAINT "GWB_SRNETAQUI_AQUIFER_FK" FOREIGN KEY ("AQUIFER_ID")
	  REFERENCES "GWBASE"."GWB_GWSTOCKW" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_STOREDRIVERNET_AQUIFERS" ADD CONSTRAINT "GWB_SRNETAQUI_RIVERNET_FK" FOREIGN KEY ("STOREDRIVERNET_ID")
	  REFERENCES "GWBASE"."GWB_STOREDRIVERNETS" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SRNETAQUI_PK" ON "GWBASE"."GWB_STOREDRIVERNET_AQUIFERS" ("STOREDRIVERNET_ID", "AQUIFER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STOREDRIVERNET_POINTS" 
   (	"STOREDRIVERNET_ID" NUMBER(10,0), 
	"SEQNR" NUMBER(10,0), 
	"X" NUMBER(12,4), 
	"Y" NUMBER(12,4), 
	"Z" NUMBER(7,3), 
	"CONNECTIONTYPE" NUMBER(4,0), 
	"CONNECTIONFACTOR" NUMBER(4,3)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SRNETPNTS_PK" ON "GWBASE"."GWB_STOREDRIVERNET_POINTS" ("STOREDRIVERNET_ID", "SEQNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STOREDRIVERNET_POINTS" ADD CONSTRAINT "GWB_SRNETPNTS_PK" PRIMARY KEY ("STOREDRIVERNET_ID", "SEQNR")
  USING INDEX "GWBASE"."GWB_SRNETPNTS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_STOREDRIVERNET_POINTS" ADD CONSTRAINT "GWB_SRNETPNTS_RIVERNET_FK" FOREIGN KEY ("STOREDRIVERNET_ID")
	  REFERENCES "GWBASE"."GWB_STOREDRIVERNETS" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SRNETPNTS_PK" ON "GWBASE"."GWB_STOREDRIVERNET_POINTS" ("STOREDRIVERNET_ID", "SEQNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STREETCAT" 
   (	"STREETKEY" NVARCHAR2(20) NOT NULL ENABLE, 
	"STREETNAME" NVARCHAR2(100) NOT NULL ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STREETCAT_PK" ON "GWBASE"."GWB_STREETCAT" ("STREETKEY") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STREETCAT" ADD CONSTRAINT "GWB_STREETCAT_PK" PRIMARY KEY ("STREETKEY")
  USING INDEX "GWBASE"."GWB_STREETCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_STREETCAT_PK" ON "GWBASE"."GWB_STREETCAT" ("STREETKEY") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STRUCTPARTS" 
   (	"ID" NUMBER(10,0), 
	"STRUCT_ID" NUMBER(10,0), 
	"STRUCTPARTNAME" VARCHAR2(50), 
	"CONNECTIONTYPE" NUMBER(4,0), 
	"CONNECTIONFACTOR" NUMBER(4,3), 
	"ELEVATIONTOP" NUMBER(7,3), 
	"NEXTPART_ID" NUMBER(10,0), 
	"PREVPART_ID" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STRUCTPARTS_PK" ON "GWBASE"."GWB_STRUCTPARTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STRUCTPARTS" ADD CONSTRAINT "GWB_STRUCTPARTS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_STRUCTPARTS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_STRUCTPARTS" ADD CONSTRAINT "GWB_STRUCTPARTS_STRUCT_FK" FOREIGN KEY ("STRUCT_ID")
	  REFERENCES "GWBASE"."GWB_STRUCTURES" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_STRUCTPARTS_PK" ON "GWBASE"."GWB_STRUCTPARTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STRUCTPARTS_AQUIFERS" 
   (	"STRUCTPART_ID" NUMBER(10,0), 
	"AQUIFER_ID" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STRUCTPARTAQUI_PK" ON "GWBASE"."GWB_STRUCTPARTS_AQUIFERS" ("STRUCTPART_ID", "AQUIFER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STRUCTPARTS_AQUIFERS" ADD CONSTRAINT "GWB_STRUCTPARTAQUI_PK" PRIMARY KEY ("STRUCTPART_ID", "AQUIFER_ID")
  USING INDEX "GWBASE"."GWB_STRUCTPARTAQUI_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_STRUCTPARTS_AQUIFERS" ADD CONSTRAINT "GWB_SPAQUI_AQUIFER_FK" FOREIGN KEY ("AQUIFER_ID")
	  REFERENCES "GWBASE"."GWB_GWSTOCKW" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_STRUCTPARTS_AQUIFERS" ADD CONSTRAINT "GWB_SPAQUI_STRUCTPART_FK" FOREIGN KEY ("STRUCTPART_ID")
	  REFERENCES "GWBASE"."GWB_STRUCTPARTS" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_STRUCTPARTAQUI_PK" ON "GWBASE"."GWB_STRUCTPARTS_AQUIFERS" ("STRUCTPART_ID", "AQUIFER_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STRUCTPARTS_POINTS" 
   (	"STRUCTPART_ID" NUMBER(10,0), 
	"POINT_ID" NUMBER(10,0), 
	"NEXTPOINT_ID" NUMBER(10,0), 
	"PREVPOINT_ID" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SPPOINTS_PK" ON "GWBASE"."GWB_STRUCTPARTS_POINTS" ("STRUCTPART_ID", "POINT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STRUCTPARTS_POINTS" ADD CONSTRAINT "GWB_SPPOINTS_PK" PRIMARY KEY ("STRUCTPART_ID", "POINT_ID")
  USING INDEX "GWBASE"."GWB_SPPOINTS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_STRUCTPARTS_POINTS" ADD CONSTRAINT "GWB_SPPOINTS_STRUCTPART_FK" FOREIGN KEY ("STRUCTPART_ID")
	  REFERENCES "GWBASE"."GWB_STRUCTPARTS" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_STRUCTPARTS_POINTS" ADD CONSTRAINT "GWB_SPPOINTS_STRUCTPOINT_FK" FOREIGN KEY ("POINT_ID")
	  REFERENCES "GWBASE"."GWB_STRUCTPOINTS" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SPPOINTS_PK" ON "GWBASE"."GWB_STRUCTPARTS_POINTS" ("STRUCTPART_ID", "POINT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STRUCTPOINTS" 
   (	"ID" NUMBER(10,0), 
	"X" NUMBER(12,4), 
	"Y" NUMBER(12,4), 
	"STATION_ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STRUCTPOINTS_PK" ON "GWBASE"."GWB_STRUCTPOINTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STRUCTPOINTS" ADD CONSTRAINT "GWB_STRUCTPOINTS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_STRUCTPOINTS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_STRUCTPOINTS" ADD CONSTRAINT "GWB_STRUCTPOINTS_WELLS_FK" FOREIGN KEY ("STATION_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_STRUCTPOINTS_PK" ON "GWBASE"."GWB_STRUCTPOINTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_STRUCTURES" 
   (	"ID" NUMBER(10,0), 
	"STRUCTNAME" VARCHAR2(50), 
	"STRUCTTYPE" CHAR(1), 
	"PRIORITY" NUMBER(4,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_STRUCTURES_PK" ON "GWBASE"."GWB_STRUCTURES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_STRUCTURES" ADD CONSTRAINT "GWB_STRUCTURES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_STRUCTURES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_STRUCTURES_PK" ON "GWBASE"."GWB_STRUCTURES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SURFACEWATERS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SURFACEWATERS_PK" ON "GWBASE"."GWB_SURFACEWATERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SURFACEWATERS" ADD CONSTRAINT "GWB_SURFACEWATERS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SURFACEWATERS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SURFACEWATERS_IDX1" ON "GWBASE"."GWB_SURFACEWATERS" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SURFACEWATERS_PK" ON "GWBASE"."GWB_SURFACEWATERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SURFACEWATER_PARTS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MAIN_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(100) NOT NULL ENABLE, 
	"SEQNR" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SURFACEWATER_PARTS_PK" ON "GWBASE"."GWB_SURFACEWATER_PARTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SURFACEWATER_PARTS" ADD CONSTRAINT "GWB_SURFACEWATER_PARTS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SURFACEWATER_PARTS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_SURFACEWATER_PARTS" ADD CONSTRAINT "GWB_SWPARTS_MAINSW_FK" FOREIGN KEY ("MAIN_ID")
	  REFERENCES "GWBASE"."GWB_SURFACEWATERS" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SURFACEWATERPARTS_IDX2" ON "GWBASE"."GWB_SURFACEWATER_PARTS" ("MAIN_ID", "ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SURFACEWATER_PARTS_PK" ON "GWBASE"."GWB_SURFACEWATER_PARTS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SYMBOLS" 
   (	"SYMBOLID" NUMBER(10,0), 
	"SYMBOLCHAR" NCHAR(1), 
	"SYMBOLTEXT" VARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SYMBOLS_PK" ON "GWBASE"."GWB_SYMBOLS" ("SYMBOLID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SYMBOLS" ADD CONSTRAINT "GWB_SYMBOLS_PK" PRIMARY KEY ("SYMBOLID")
  USING INDEX "GWBASE"."GWB_SYMBOLS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SYMBOLS_PK" ON "GWBASE"."GWB_SYMBOLS" ("SYMBOLID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_SYMBOLSCATEGORIES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"FIELD_NAME" NVARCHAR2(50) NOT NULL ENABLE, 
	"CATEGORY" NVARCHAR2(100), 
	"ICON" NVARCHAR2(100), 
	"ICONPOSITION" NVARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_SYMBOLSCATEGORIES_PK" ON "GWBASE"."GWB_SYMBOLSCATEGORIES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_SYMBOLSCATEGORIES" ADD CONSTRAINT "GWB_SYMBOLSCATEGORIES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_SYMBOLSCATEGORIES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_SYMBOLSCATEGORIES_PK" ON "GWBASE"."GWB_SYMBOLSCATEGORIES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_TASTE" 
   (	"ID" NUMBER(10,0), 
	"TASTE" NVARCHAR2(50), 
	"KEYNE" VARCHAR2(10), 
	"KEYNR" CHAR(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TASTE_PK" ON "GWBASE"."GWB_TASTE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TASTE" ADD CONSTRAINT "GWB_TASTE_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TASTE_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TASTE_PK" ON "GWBASE"."GWB_TASTE" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_TECHEQUIPMENT" 
   (	"ID" NUMBER(10,0), 
	"CATEGORY" CHAR(1), 
	"TYPE" VARCHAR2(50), 
	"PERSON" VARCHAR2(30), 
	"INVENTORYNO" VARCHAR2(50), 
	"MATERIAL" VARCHAR2(20), 
	"PRICE" NUMBER(10,2), 
	"DATEAQUIRED" DATE, 
	"MANUFACTURER" VARCHAR2(50), 
	"YEARMADE" NUMBER(4,0), 
	"REMARKS" CLOB, 
	"DATAFILE" VARCHAR2(255), 
	"RATEDFLOW" NUMBER(12,4), 
	"RATEDFLOWUNIT" VARCHAR2(10), 
	"RATEDCURRENT" NUMBER(12,4), 
	"RATEDHEAD" NUMBER(12,4), 
	"RATEDHEADUNIT" VARCHAR2(5), 
	"DIAMETER" NUMBER(10,2), 
	"DIAMETERUNIT" VARCHAR2(5), 
	"LENGTH" NUMBER(10,2), 
	"LENGTHUNIT" VARCHAR2(5), 
	"SYSTEMLENGTH" NUMBER(10,2), 
	"SYSTEMLENGTHUNIT" NVARCHAR2(5), 
	"SIMCARDNO" NVARCHAR2(20), 
	"SERIALNO" NVARCHAR2(50), 
	"INACTIVE" NVARCHAR2(1) DEFAULT 'N'
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("REMARKS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIPMENT_PK" ON "GWBASE"."GWB_TECHEQUIPMENT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHEQUIPMENT" ADD CONSTRAINT "GWB_TECHEQUIPMENT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHEQUIPMENT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIPMENT_PK" ON "GWBASE"."GWB_TECHEQUIPMENT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076138C00011$$" ON "GWBASE"."GWB_TECHEQUIPMENT" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_TECHEQUIP_HISTORY" 
   (	"ID" NUMBER(10,0), 
	"EQUIP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STARTDATE" DATE, 
	"ENDDATE" DATE, 
	"HISTORYTYPE" CHAR(1)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_HISTORY_PK" ON "GWBASE"."GWB_TECHEQUIP_HISTORY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHEQUIP_HISTORY" ADD CONSTRAINT "GWB_TECHEQUIP_HISTORY_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHEQUIP_HISTORY_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_TECHEQUIP_HISTORY" ADD CONSTRAINT "GWB_TEHISTORY_EQUIP_FK" FOREIGN KEY ("EQUIP_ID")
	  REFERENCES "GWBASE"."GWB_TECHEQUIPMENT" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_TECHEQUIP_HISTORY" ADD CONSTRAINT "GWB_TEHISTORY_WELLS_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_HISTORY_PK" ON "GWBASE"."GWB_TECHEQUIP_HISTORY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_TECHEQUIP_MANUFACTURERCAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MANUFACTURER" NVARCHAR2(70) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_MANUFACTURERCAT_PK" ON "GWBASE"."GWB_TECHEQUIP_MANUFACTURERCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHEQUIP_MANUFACTURERCAT" ADD CONSTRAINT "GWB_TECHEQUIP_MANUFACTURERCAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHEQUIP_MANUFACTURERCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_MANUFACTURERCAT_PK" ON "GWBASE"."GWB_TECHEQUIP_MANUFACTURERCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_TECHEQUIP_REPAIRS" 
   (	"ID" NUMBER(10,0), 
	"EQUIP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"HISTORY_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ADDRESS" VARCHAR2(255), 
	"PERSON" VARCHAR2(30), 
	"REPAIRREASON" VARCHAR2(255), 
	"REPAIRCOSTS" NUMBER(10,2), 
	"REMARKS" CLOB
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("REMARKS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_REPAIRS_PK" ON "GWBASE"."GWB_TECHEQUIP_REPAIRS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHEQUIP_REPAIRS" ADD CONSTRAINT "GWB_TECHEQUIP_REPAIRS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHEQUIP_REPAIRS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_TECHEQUIP_REPAIRS" ADD CONSTRAINT "GWB_TEREPAIRS_EQUIP_FK" FOREIGN KEY ("EQUIP_ID")
	  REFERENCES "GWBASE"."GWB_TECHEQUIPMENT" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_TECHEQUIP_REPAIRS" ADD CONSTRAINT "GWB_TEREPAIRS_HISTORY_FK" FOREIGN KEY ("HISTORY_ID")
	  REFERENCES "GWBASE"."GWB_TECHEQUIP_HISTORY" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_REPAIRS_PK" ON "GWBASE"."GWB_TECHEQUIP_REPAIRS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076141C00008$$" ON "GWBASE"."GWB_TECHEQUIP_REPAIRS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_TECHEQUIP_STORES" 
   (	"ID" NUMBER(10,0), 
	"EQUIP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"HISTORY_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STOREADDRESS" VARCHAR2(255), 
	"REMARKS" CLOB
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("REMARKS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_STORES_PK" ON "GWBASE"."GWB_TECHEQUIP_STORES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHEQUIP_STORES" ADD CONSTRAINT "GWB_TECHEQUIP_STORES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHEQUIP_STORES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_TECHEQUIP_STORES" ADD CONSTRAINT "GWB_TESTORES_EQUIP_FK" FOREIGN KEY ("EQUIP_ID")
	  REFERENCES "GWBASE"."GWB_TECHEQUIPMENT" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_TECHEQUIP_STORES" ADD CONSTRAINT "GWB_TESTORES_HISTORY_FK" FOREIGN KEY ("HISTORY_ID")
	  REFERENCES "GWBASE"."GWB_TECHEQUIP_HISTORY" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_STORES_PK" ON "GWBASE"."GWB_TECHEQUIP_STORES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076144C00005$$" ON "GWBASE"."GWB_TECHEQUIP_STORES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_TECHEQUIP_TYPECAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"EQUIPTYPE" NVARCHAR2(70) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_TYPECAT_PK" ON "GWBASE"."GWB_TECHEQUIP_TYPECAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHEQUIP_TYPECAT" ADD CONSTRAINT "GWB_TECHEQUIP_TYPECAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHEQUIP_TYPECAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_TYPECAT_PK" ON "GWBASE"."GWB_TECHEQUIP_TYPECAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_TECHEQUIP_WELLS" 
   (	"ID" NUMBER(10,0), 
	"EQUIP_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"HISTORY_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"DEPTH" NUMBER(8,2), 
	"DEPTHUNIT" VARCHAR2(5), 
	"REMARKS" CLOB
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("REMARKS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_WELLS_PK" ON "GWBASE"."GWB_TECHEQUIP_WELLS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHEQUIP_WELLS" ADD CONSTRAINT "GWB_TECHEQUIP_WELLS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHEQUIP_WELLS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_TECHEQUIP_WELLS" ADD CONSTRAINT "GWB_TEWELLS_EQUIP_FK" FOREIGN KEY ("EQUIP_ID")
	  REFERENCES "GWBASE"."GWB_TECHEQUIPMENT" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_TECHEQUIP_WELLS" ADD CONSTRAINT "GWB_TEWELLS_HISTORY_FK" FOREIGN KEY ("HISTORY_ID")
	  REFERENCES "GWBASE"."GWB_TECHEQUIP_HISTORY" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHEQUIP_WELLS_PK" ON "GWBASE"."GWB_TECHEQUIP_WELLS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076148C00006$$" ON "GWBASE"."GWB_TECHEQUIP_WELLS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_TECHPARTSCAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"CLASS_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHPARTSCAT_PK" ON "GWBASE"."GWB_TECHPARTSCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHPARTSCAT" ADD CONSTRAINT "GWB_TECHPARTSCAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHPARTSCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHPARTSCAT_IDX1" ON "GWBASE"."GWB_TECHPARTSCAT" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHPARTSCAT_PK" ON "GWBASE"."GWB_TECHPARTSCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_TECHPARTSCLASSCAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHPARTSCLASSCAT_PK" ON "GWBASE"."GWB_TECHPARTSCLASSCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TECHPARTSCLASSCAT" ADD CONSTRAINT "GWB_TECHPARTSCLASSCAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TECHPARTSCLASSCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TECHPARTSCLASSCAT_IDX1" ON "GWBASE"."GWB_TECHPARTSCLASSCAT" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TECHPARTSCLASSCAT_PK" ON "GWBASE"."GWB_TECHPARTSCLASSCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_TODOCATEGORIES" 
   (	"ID" NUMBER(10,0), 
	"CATEGORYNAME" VARCHAR2(50), 
	"SAP_KEY" NVARCHAR2(50), 
	"REPEATMONTHS" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TODOCATEGORIES_PK" ON "GWBASE"."GWB_TODOCATEGORIES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TODOCATEGORIES" ADD CONSTRAINT "GWB_TODOCATEGORIES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_TODOCATEGORIES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TODOCATEGORIES_PK" ON "GWBASE"."GWB_TODOCATEGORIES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_TOPOGRAF" 
   (	"PROJECT_ID" NUMBER(10,0), 
	"RECHTSWERT" NUMBER(12,4), 
	"HOCHWERT" NUMBER(12,4), 
	"HOEHENN" NUMBER(6,2)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_TOPOGRAF_PK" ON "GWBASE"."GWB_TOPOGRAF" ("PROJECT_ID", "RECHTSWERT", "HOCHWERT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_TOPOGRAF" ADD CONSTRAINT "GWB_TOPOGRAF_PK" PRIMARY KEY ("PROJECT_ID", "RECHTSWERT", "HOCHWERT")
  USING INDEX "GWBASE"."GWB_TOPOGRAF_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_TOPOGRAF_PK" ON "GWBASE"."GWB_TOPOGRAF" ("PROJECT_ID", "RECHTSWERT", "HOCHWERT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_UKAT" 
   (	"KATALOGNR" NUMBER(10,0), 
	"KATALOGBEZEICHNUNG" VARCHAR2(50), 
	"KATALOGTYPE" NUMBER(10,0), 
	"LAB_ID" NUMBER(10,0), 
	"SEQ_NR" NUMBER(10,0), 
	"DETECTLIMIT" NUMBER(12,4), 
	"SEQNR" NUMBER(10,0), 
	"ACTIVE" NVARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_UKAT_PK" ON "GWBASE"."GWB_UKAT" ("KATALOGNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_UKAT" ADD CONSTRAINT "GWB_UKAT_PK" PRIMARY KEY ("KATALOGNR")
  USING INDEX "GWBASE"."GWB_UKAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_UKAT_PK" ON "GWBASE"."GWB_UKAT" ("KATALOGNR") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_UMRECH" 
   (	"EINHEIT1" VARCHAR2(10), 
	"EINHEIT2" VARCHAR2(10), 
	"FAKTOR" NUMBER(16,8)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_UMRECH_PK" ON "GWBASE"."GWB_UMRECH" ("EINHEIT1", "EINHEIT2") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_UMRECH" ADD CONSTRAINT "GWB_UMRECH_PK" PRIMARY KEY ("EINHEIT1", "EINHEIT2")
  USING INDEX "GWBASE"."GWB_UMRECH_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_UMRECH_PK" ON "GWBASE"."GWB_UMRECH" ("EINHEIT1", "EINHEIT2") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_USERS" 
   (	"US_LOGINNAME" VARCHAR2(20), 
	"US_USERNAME" VARCHAR2(30), 
	"US_PASSWORD" VARCHAR2(10), 
	"US_ISADMIN" CHAR(1) DEFAULT 'N', 
	"US_ALLOWLOOKUPLISTS" CHAR(1) DEFAULT 'Y', 
	"US_ALLOWWARNLIST" CHAR(1) DEFAULT 'Y', 
	"US_PRIVATEMAPS" CHAR(1) DEFAULT 'Y', 
	"US_TABLELAYOUTCHANGE" CHAR(1) DEFAULT 'Y', 
	"US_LOGGERDATA" CHAR(1) DEFAULT 'Y', 
	"US_LASTUSER" CHAR(1), 
	"U_PRIV_WELLS" NUMBER(4,0), 
	"U_PRIV_LEVEL" NUMBER(4,0), 
	"U_PRIV_ANALYSIS" NUMBER(4,0), 
	"U_PRIV_DISCHARGE" NUMBER(4,0), 
	"U_PRIV_RAINFALL" NUMBER(4,0), 
	"ID" NUMBER(10,0), 
	"US_PRIVATESUBPROJECTS" NVARCHAR2(1), 
	"US_WINUSERNAME" NVARCHAR2(255), 
	"TEMPLATEDIRECTORY" NVARCHAR2(255), 
	"US_PASSWORDHASH" NVARCHAR2(255), 
	"US_ALLPROJECTS" NVARCHAR2(1), 
	"US_SAMPLESTATECHANGE" NVARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_USERS_PK" ON "GWBASE"."GWB_USERS" ("US_LOGINNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_USERS" ADD CONSTRAINT "GWB_USERS_PK" PRIMARY KEY ("US_LOGINNAME")
  USING INDEX "GWBASE"."GWB_USERS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_USERS_PK" ON "GWBASE"."GWB_USERS" ("US_LOGINNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_USERSELECTION" 
   (	"USER_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"LIST_TYPE" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_VALUEMARKERS" 
   (	"MARKER" VARCHAR2(1), 
	"MARKERTEXT" VARCHAR2(50), 
	"COLOR" NUMBER(10,0), 
	"ID" NUMBER(10,0), 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWTRANSFERDATE" DATE, 
	"HASFLAG" NCHAR(1) DEFAULT '-', 
	"FLAGDEFINITION" CLOB, 
	"FLAGPREVIEW" BLOB
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("FLAGDEFINITION") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("FLAGPREVIEW") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_VALUEMARKERS_PK" ON "GWBASE"."GWB_VALUEMARKERS" ("MARKER") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_VALUEMARKERS" ADD CONSTRAINT "GWB_VALUEMARKERS_PK" PRIMARY KEY ("MARKER")
  USING INDEX "GWBASE"."GWB_VALUEMARKERS_PK"  ENABLE;

CREATE OR REPLACE EDITIONABLE TRIGGER "GWBASE"."TRIG_AI_GWB_VALUEMARKERS" BEFORE INSERT ON GWB_ValueMarkers FOR EACH ROW 
BEGIN 
   SELECT SEQ_AI_GWB_ValueMarkers.NEXTVAL 
   INTO :new.ID 
   FROM dual; 
END;
/
ALTER TRIGGER "GWBASE"."TRIG_AI_GWB_VALUEMARKERS" ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_VALUEMARKERS_PK" ON "GWBASE"."GWB_VALUEMARKERS" ("MARKER") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076159C00009$$" ON "GWBASE"."GWB_VALUEMARKERS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076159C00008$$" ON "GWBASE"."GWB_VALUEMARKERS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWB_VALVEPOSITION" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"VALVE_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"DATE_TIME" DATE, 
	"VALVEPOSITION" NUMBER(10,0), 
	"MAXVALVEPOSITION" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_VALVEPOSITION_PK" ON "GWBASE"."GWB_VALVEPOSITION" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_VALVEPOSITION" ADD CONSTRAINT "GWB_VALVEPOSITION_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_VALVEPOSITION_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_VALVEPOSITION" ADD CONSTRAINT "GWB_VALVEPOSITION_VALVE_FK" FOREIGN KEY ("VALVE_ID")
	  REFERENCES "GWBASE"."GWB_VALVES" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_VALVEPOSITION_PK" ON "GWBASE"."GWB_VALVEPOSITION" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_VALVES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"OBJECT_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ELEVATION" NUMBER(10,2), 
	"DIAMETER" NUMBER(10,0), 
	"TYPE_ID" NUMBER(10,0), 
	"MAXPOSITION" NUMBER(10,0), 
	"DESCRIPTION" NVARCHAR2(50)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_VALVES_PK" ON "GWBASE"."GWB_VALVES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_VALVES" ADD CONSTRAINT "GWB_VALVES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_VALVES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_VALVES" ADD CONSTRAINT "GWB_VALVES_OBJECT_FK" FOREIGN KEY ("OBJECT_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_VALVES_PK" ON "GWBASE"."GWB_VALVES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_VALVETYPECAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_VALVETYPECAT_PK" ON "GWBASE"."GWB_VALVETYPECAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_VALVETYPECAT" ADD CONSTRAINT "GWB_VALVETYPECAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_VALVETYPECAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_VALVETYPECAT_IDX1" ON "GWBASE"."GWB_VALVETYPECAT" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_VALVETYPECAT_PK" ON "GWBASE"."GWB_VALVETYPECAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_VERSION" 
   (	"VERSION" VARCHAR2(10), 
	"VERSION7" VARCHAR2(10), 
	"VERSION8" VARCHAR2(10), 
	"BACKUPDATE" DATE, 
	"VERSION9" NVARCHAR2(10)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_VIRTUALWELLS" 
   (	"ID" NUMBER(10,0), 
	"STATIONNAME" VARCHAR2(20), 
	"REFERENCESTATION_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"X" NUMBER(12,4), 
	"Y" NUMBER(12,4), 
	"Z" NUMBER(7,3), 
	"TIMELAG" NUMBER(4,0), 
	"SHIFT" NUMBER(7,3), 
	"ISABSOLUTE" CHAR(1) DEFAULT 'N', 
	"ISACTIVE" CHAR(1) DEFAULT 'Y', 
	"CREATEDBY" VARCHAR2(20), 
	"COMMENTS" VARCHAR2(255), 
	"SYMBOL" NUMBER(10,0), 
	"UTM_EAST" NUMBER(12,4), 
	"UTM_NORTH" NUMBER(12,4)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_VIRTUALWELLS_PK" ON "GWBASE"."GWB_VIRTUALWELLS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_VIRTUALWELLS" ADD CONSTRAINT "GWB_VIRTUALWELLS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_VIRTUALWELLS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_VIRTUALWELLS" ADD CONSTRAINT "GWB_VIRTUALWELLS_WELLS_FK" FOREIGN KEY ("REFERENCESTATION_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_VIRTUALWELLS_PK" ON "GWBASE"."GWB_VIRTUALWELLS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WATERTYPECAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"ITEMNAME" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WATERTYPECAT_PK" ON "GWBASE"."GWB_WATERTYPECAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WATERTYPECAT" ADD CONSTRAINT "GWB_WATERTYPECAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WATERTYPECAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WATERTYPECAT_IDX1" ON "GWBASE"."GWB_WATERTYPECAT" ("ITEMNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WATERTYPECAT_PK" ON "GWBASE"."GWB_WATERTYPECAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLGEOLOGY" 
   (	"ID" NUMBER(10,0), 
	"WELL_ID" NUMBER(10,0), 
	"GEOLOGY_ID" NUMBER(10,0), 
	"DEPTHTOBASE" NUMBER(7,3), 
	"DEEPER" NVARCHAR2(1)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLGEOLOGY_PK" ON "GWBASE"."GWB_WELLGEOLOGY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLGEOLOGY" ADD CONSTRAINT "GWB_WELLGEOLOGY_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WELLGEOLOGY_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_WELLGEOLOGY" ADD CONSTRAINT "GWB_WELLGEOLOGY_GEOL_FK" FOREIGN KEY ("GEOLOGY_ID")
	  REFERENCES "GWBASE"."GWB_GEOLOGIE" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_WELLGEOLOGY" ADD CONSTRAINT "GWB_WELLGEOLOGY_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLGEOLOGY_PK" ON "GWBASE"."GWB_WELLGEOLOGY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLPROPERTIES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PROPERTY_NAME" NVARCHAR2(50) NOT NULL ENABLE, 
	"PROPERTY_KEY" NVARCHAR2(20), 
	"USECATALOG" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLPROPERTIES_PK" ON "GWBASE"."GWB_WELLPROPERTIES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLPROPERTIES" ADD CONSTRAINT "GWB_WELLPROPERTIES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WELLPROPERTIES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLPROPERTIES_PK" ON "GWBASE"."GWB_WELLPROPERTIES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLPROPERTIES_VALUES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PROPERTY_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"VALUETEXT" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLPROPERTIES_VALUES_PK" ON "GWBASE"."GWB_WELLPROPERTIES_VALUES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLPROPERTIES_VALUES" ADD CONSTRAINT "GWB_WELLPROPERTIES_VALUES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WELLPROPERTIES_VALUES_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_WELLPROPERTIES_VALUES" ADD CONSTRAINT "GWB_WPVALUES_PROPERTY_FK" FOREIGN KEY ("PROPERTY_ID")
	  REFERENCES "GWBASE"."GWB_WELLPROPERTIES" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLPROPERTIES_VALUES_PK" ON "GWBASE"."GWB_WELLPROPERTIES_VALUES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLPROPERTIES_WELLS" 
   (	"PROPERTY_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PROPERTYTEXT" NVARCHAR2(255), 
	"PROPERTYDATE" DATE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLPROPS__WELLS_PK" ON "GWBASE"."GWB_WELLPROPERTIES_WELLS" ("PROPERTY_ID", "WELL_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLPROPERTIES_WELLS" ADD CONSTRAINT "GWB_WELLPROPS__WELLS_PK" PRIMARY KEY ("PROPERTY_ID", "WELL_ID")
  USING INDEX "GWBASE"."GWB_WELLPROPS__WELLS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLPROPS__WELLS_PK" ON "GWBASE"."GWB_WELLPROPERTIES_WELLS" ("PROPERTY_ID", "WELL_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLPUMPRATES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STARTDATE" DATE, 
	"ENDDATE" DATE, 
	"PUMPRATE" NUMBER(10,4), 
	"PUMPUNIT" NVARCHAR2(1)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLPUMPRATES_PK" ON "GWBASE"."GWB_WELLPUMPRATES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLPUMPRATES" ADD CONSTRAINT "GWB_WELLPUMPRATES_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WELLPUMPRATES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLPUMPRATES_PK" ON "GWBASE"."GWB_WELLPUMPRATES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLSTATUSCAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STATUSNAME" NVARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLSTATUSCAT_PK" ON "GWBASE"."GWB_WELLSTATUSCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLSTATUSCAT" ADD CONSTRAINT "GWB_WELLSTATUSCAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WELLSTATUSCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLSTATUSCAT_IX1" ON "GWBASE"."GWB_WELLSTATUSCAT" ("STATUSNAME") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLSTATUSCAT_PK" ON "GWBASE"."GWB_WELLSTATUSCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLSTATUSHISTORY" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STATUS_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"STATUSDATE" DATE NOT NULL ENABLE, 
	"STATUSCOMMENTTEXT" NVARCHAR2(100)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLSTATUSHISTORY_PK" ON "GWBASE"."GWB_WELLSTATUSHISTORY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLSTATUSHISTORY" ADD CONSTRAINT "GWB_WELLSTATUSHISTORY_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WELLSTATUSHISTORY_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_WELLSTATUSHISTORY" ADD CONSTRAINT "GWB_WELLSTATUSHISTORY_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWB_WELLSTATUSHISTORY" ADD CONSTRAINT "GWB_WELLSTATUSHISTORY_STATUS_FK" FOREIGN KEY ("STATUS_ID")
	  REFERENCES "GWBASE"."GWB_WELLSTATUSCAT" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLSTATUSHISTORY_IX1" ON "GWBASE"."GWB_WELLSTATUSHISTORY" ("WELL_ID", "STATUSDATE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLSTATUSHISTORY_PK" ON "GWBASE"."GWB_WELLSTATUSHISTORY" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLSTDTODOCATEGORIES" 
   (	"WELL_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"CATEGORY_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"REPEATMONTHS" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLSTDTODOCATEGORIES_PK" ON "GWBASE"."GWB_WELLSTDTODOCATEGORIES" ("WELL_ID", "CATEGORY_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLSTDTODOCATEGORIES" ADD CONSTRAINT "GWB_WELLSTDTODOCATEGORIES_PK" PRIMARY KEY ("WELL_ID", "CATEGORY_ID")
  USING INDEX "GWBASE"."GWB_WELLSTDTODOCATEGORIES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLSTDTODOCATEGORIES_PK" ON "GWBASE"."GWB_WELLSTDTODOCATEGORIES" ("WELL_ID", "CATEGORY_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLS_PROJECTS" 
   (	"WELL_ID" NUMBER(10,0), 
	"PROJECT_ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLS_PROJECTS_PK" ON "GWBASE"."GWB_WELLS_PROJECTS" ("WELL_ID", "PROJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLS_PROJECTS" ADD CONSTRAINT "GWB_WELLS_PROJECTS_PK" PRIMARY KEY ("WELL_ID", "PROJECT_ID")
  USING INDEX "GWBASE"."GWB_WELLS_PROJECTS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLS_PROJECTS_PK" ON "GWBASE"."GWB_WELLS_PROJECTS" ("WELL_ID", "PROJECT_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLTODOLIST" 
   (	"ID" NUMBER(10,0), 
	"WELL_ID" NUMBER(10,0), 
	"CATEGORY_ID" NUMBER(10,0), 
	"DESCRIPTION" VARCHAR2(255), 
	"CREATEDATE" DATE, 
	"TODOUNTIL" DATE, 
	"USER_ID" NUMBER(10,0), 
	"DONEDATE" DATE, 
	"DONECOMMENT" VARCHAR2(255), 
	"DONEUSER_ID" NUMBER(10,0), 
	"SAP_NOTIFYNUMBER" NVARCHAR2(10), 
	"SAP_ORDERNUMBER" NVARCHAR2(10), 
	"SAP_STATUS" NVARCHAR2(10), 
	"STATUS" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WELLTODOLIST_PK" ON "GWBASE"."GWB_WELLTODOLIST" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WELLTODOLIST" ADD CONSTRAINT "GWB_WELLTODOLIST_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WELLTODOLIST_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_WELLTODOLIST" ADD CONSTRAINT "GWB_WELLTODOLIST_CAT_FK" FOREIGN KEY ("CATEGORY_ID")
	  REFERENCES "GWBASE"."GWB_TODOCATEGORIES" ("ID") ENABLE;
  ALTER TABLE "GWBASE"."GWB_WELLTODOLIST" ADD CONSTRAINT "GWB_WELLTODOLIST_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WELLTODOLIST_PK" ON "GWBASE"."GWB_WELLTODOLIST" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WELLTODOLISTSAP_ERR" 
   (	"GWB_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"TYPE" NVARCHAR2(1) NOT NULL ENABLE, 
	"ID" NVARCHAR2(20), 
	"NUMBER" NVARCHAR2(3), 
	"MESSAGE" NVARCHAR2(220), 
	"LOG_NO" NVARCHAR2(20), 
	"LOG_MSG_NO" NVARCHAR2(6), 
	"MESSAGE_V1" NVARCHAR2(50), 
	"MESSAGE_V2" NVARCHAR2(50), 
	"MESSAGE_V3" NVARCHAR2(50), 
	"MESSAGE_V4" NVARCHAR2(50), 
	"PARAMETER" NVARCHAR2(32), 
	"ROW" NUMBER(10,0), 
	"FIELD" NVARCHAR2(30), 
	"SYSTEM" NVARCHAR2(10), 
	"MESSAGE_DATE" DATE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWB_WSTAND" 
   (	"ID" NUMBER(10,0), 
	"MESSTELLENID" NUMBER(10,0) NOT NULL ENABLE, 
	"DATUMZEIT" DATE NOT NULL ENABLE, 
	"WASSERSTAND" NUMBER(7,3), 
	"BEZUGMP" CHAR(1) DEFAULT 'Y', 
	"QUALITY" CHAR(1) DEFAULT '+', 
	"PERSON_ID" NUMBER(10,0), 
	"IMPORT_ID" NUMBER(10,0), 
	"LEVEL_SL" NUMBER(8,2), 
	"LOGGEDDEPTH" NUMBER(8,2), 
	"LOGGEDDEPTH_SL" NUMBER(8,2), 
	"DATATYPE" NUMBER(10,0) DEFAULT 0
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WSTAND_PK" ON "GWBASE"."GWB_WSTAND" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWB_WSTAND" ADD CONSTRAINT "GWB_WSTAND_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWB_WSTAND_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWB_WSTAND" ADD CONSTRAINT "GWB_WSTAND_WELLS_FK" FOREIGN KEY ("MESSTELLENID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_WSTAND_IDX1" ON "GWBASE"."GWB_WSTAND" ("MESSTELLENID", "DATUMZEIT") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_WSTAND_PK" ON "GWBASE"."GWB_WSTAND" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWC_WELLCATEGORIES" 
   (	"TYPE_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"CATEGORY_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"NAME" NVARCHAR2(128) NOT NULL ENABLE, 
	"SEQNR" NUMBER(10,0) DEFAULT 32000, 
	"SYMBOLFILENAME" NVARCHAR2(32), 
	"SYMBOLDEFINITION" NVARCHAR2(128), 
	"SYMBOLWIDTH" NUMBER(10,0), 
	"SYMBOLHEIGHT" NUMBER(10,0), 
	"SYMBOLANCHORX" NUMBER(10,0) DEFAULT 0, 
	"SYMBOLANCHORY" NUMBER(10,0) DEFAULT 0, 
	"SYMBOLHOTSPOT" NCHAR(2) DEFAULT 'CC', 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWFILEDATE" DATE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWC_WELLCATEGORIES" ON "GWBASE"."GWC_WELLCATEGORIES" ("TYPE_ID", "CATEGORY_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWC_WELLCATEGORIES" ADD CONSTRAINT "PK_GWC_WELLCATEGORIES" PRIMARY KEY ("TYPE_ID", "CATEGORY_ID")
  USING INDEX "GWBASE"."PK_GWC_WELLCATEGORIES"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWC_WELLCATEGORIES" ON "GWBASE"."GWC_WELLCATEGORIES" ("TYPE_ID", "CATEGORY_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWC_WELLCATEGORY_TYPES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"TABLENAME" NVARCHAR2(30), 
	"NAME" NVARCHAR2(50) NOT NULL ENABLE, 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWTRANSFERDATE" DATE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWC_WELLCATEGORY_TYPES" ON "GWBASE"."GWC_WELLCATEGORY_TYPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWC_WELLCATEGORY_TYPES" ADD CONSTRAINT "PK_GWC_WELLCATEGORY_TYPES" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."PK_GWC_WELLCATEGORY_TYPES"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWC_WELLCATEGORY_TYPES" ON "GWBASE"."GWC_WELLCATEGORY_TYPES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWM_DEPTHS" 
   (	"WELL_ID" NUMBER(10,0), 
	"DEPTH" NUMBER(8,2)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_DEPTHS_PK" ON "GWBASE"."GWM_DEPTHS" ("WELL_ID", "DEPTH") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWM_DEPTHS" ADD CONSTRAINT "GWB_DEPTHS_PK" PRIMARY KEY ("WELL_ID", "DEPTH")
  USING INDEX "GWBASE"."GWB_DEPTHS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWM_DEPTHS" ADD CONSTRAINT "GWM_DEPTHS_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_DEPTHS_PK" ON "GWBASE"."GWM_DEPTHS" ("WELL_ID", "DEPTH") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWM_PERSONS" 
   (	"PERSON_ID" NUMBER(10,0), 
	"PERSON_NAME" VARCHAR2(50), 
	"PERSON_PIN" VARCHAR2(4), 
	"ALLOWSEELASTVALUE" CHAR(1) DEFAULT 'N', 
	"ALLOWMODIFYWELLDATA" CHAR(1) DEFAULT 'N', 
	"PERSONTYPE" NVARCHAR2(1), 
	"SAP_KEY" NVARCHAR2(50)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_PERSONS_PK" ON "GWBASE"."GWM_PERSONS" ("PERSON_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWM_PERSONS" ADD CONSTRAINT "GWB_PERSONS_PK" PRIMARY KEY ("PERSON_ID")
  USING INDEX "GWBASE"."GWB_PERSONS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_PERSONS_PK" ON "GWBASE"."GWM_PERSONS" ("PERSON_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWM_PICTURECATEGORIESCAT" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"PICTURECATEGORY" NVARCHAR2(50) NOT NULL ENABLE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWM_PICTURECATEGORIESCAT_PK" ON "GWBASE"."GWM_PICTURECATEGORIESCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWM_PICTURECATEGORIESCAT" ADD CONSTRAINT "GWM_PICTURECATEGORIESCAT_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."GWM_PICTURECATEGORIESCAT_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWM_PICTURECATEGORIESCAT_PK" ON "GWBASE"."GWM_PICTURECATEGORIESCAT" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWM_ROUTES" 
   (	"ROUTE_ID" NUMBER(10,0), 
	"ROUTE_NAME" VARCHAR2(50), 
	"ROUTE_TYPE" CHAR(1), 
	"PERSON1_ID" NUMBER(10,0), 
	"PERSON2_ID" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_ROUTES_PK" ON "GWBASE"."GWM_ROUTES" ("ROUTE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWM_ROUTES" ADD CONSTRAINT "GWB_ROUTES_PK" PRIMARY KEY ("ROUTE_ID")
  USING INDEX "GWBASE"."GWB_ROUTES_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_ROUTES_PK" ON "GWBASE"."GWM_ROUTES" ("ROUTE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWM_ROUTES_WELLS" 
   (	"ROUTE_ID" NUMBER(10,0), 
	"WELL_ID" NUMBER(10,0), 
	"SEQNR" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."GWB_ROUTES_WELLS_PK" ON "GWBASE"."GWM_ROUTES_WELLS" ("ROUTE_ID", "WELL_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWM_ROUTES_WELLS" ADD CONSTRAINT "GWB_ROUTES_WELLS_PK" PRIMARY KEY ("ROUTE_ID", "WELL_ID")
  USING INDEX "GWBASE"."GWB_ROUTES_WELLS_PK"  ENABLE;

ALTER TABLE "GWBASE"."GWM_ROUTES_WELLS" ADD CONSTRAINT "GWM_ROUTESWELLS_ROUTE_FK" FOREIGN KEY ("ROUTE_ID")
	  REFERENCES "GWBASE"."GWM_ROUTES" ("ROUTE_ID") ON DELETE CASCADE ENABLE;
  ALTER TABLE "GWBASE"."GWM_ROUTES_WELLS" ADD CONSTRAINT "GWM_ROUTESWELLS_WELL_FK" FOREIGN KEY ("WELL_ID")
	  REFERENCES "GWBASE"."GWB_MSSTAMM" ("ID") ON DELETE CASCADE ENABLE;

CREATE UNIQUE INDEX "GWBASE"."GWB_ROUTES_WELLS_PK" ON "GWBASE"."GWM_ROUTES_WELLS" ("ROUTE_ID", "WELL_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWW_DATASTATUS" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"DATATYPE" NUMBER(10,0) NOT NULL ENABLE, 
	"PARAMID" NUMBER(10,0) NOT NULL ENABLE, 
	"COUNT_" NUMBER(10,0), 
	"MINDATE" DATE, 
	"MAXDATE" DATE
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWW_DATASTATUS" ON "GWBASE"."GWW_DATASTATUS" ("MSID", "DATATYPE", "PARAMID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWW_DATASTATUS" ADD CONSTRAINT "PK_GWW_DATASTATUS" PRIMARY KEY ("MSID", "DATATYPE", "PARAMID")
  USING INDEX "GWBASE"."PK_GWW_DATASTATUS"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWW_DATASTATUS" ON "GWBASE"."GWW_DATASTATUS" ("MSID", "DATATYPE", "PARAMID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."GWW_LAYERS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"FILENAME" NVARCHAR2(255) NOT NULL ENABLE, 
	"DIRECTORY" NVARCHAR2(255) NOT NULL ENABLE, 
	"LAYERCLASS" NUMBER(10,0), 
	"GEOTYPE" NVARCHAR2(20), 
	"DISPLAYNAME" NVARCHAR2(128), 
	"DESCRIPTION" CLOB, 
	"DEFINITION" CLOB, 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWFILEDATE" DATE, 
	"SORTNO" NUMBER(10,0) DEFAULT 32000
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("DESCRIPTION") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("DEFINITION") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWW_LAYERS" ON "GWBASE"."GWW_LAYERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWW_LAYERS" ADD CONSTRAINT "PK_GWW_LAYERS" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."PK_GWW_LAYERS"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWW_LAYERS" ON "GWBASE"."GWW_LAYERS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076190C00008$$" ON "GWBASE"."GWW_LAYERS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076190C00007$$" ON "GWBASE"."GWW_LAYERS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWW_MAPS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"DISPLAYNAME" NVARCHAR2(128), 
	"NAME" NVARCHAR2(128), 
	"TITLE" NVARCHAR2(128), 
	"URL" CLOB, 
	"PROVIDERNAME" NVARCHAR2(128), 
	"PROVIDERURL" CLOB, 
	"SOURCENAME" NVARCHAR2(128), 
	"SOURCEURL" CLOB, 
	"CRS" NVARCHAR2(16), 
	"CRSNAME" NVARCHAR2(64), 
	"AVAILABLECRS" CLOB, 
	"ABSTRACT" CLOB, 
	"SERVICETYPE" NVARCHAR2(32), 
	"SERVICEVERSION" NVARCHAR2(16), 
	"JSLAYERDEF" CLOB, 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWTRANSFERDATE" DATE, 
	"SORTNO" NUMBER(10,0) DEFAULT 32000, 
	"ISOVERLAY" NVARCHAR2(1) DEFAULT '-'
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("URL") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("PROVIDERURL") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("SOURCEURL") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("AVAILABLECRS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("ABSTRACT") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("JSLAYERDEF") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWW_MAPS" ON "GWBASE"."GWW_MAPS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWW_MAPS" ADD CONSTRAINT "PK_GWW_MAPS" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."PK_GWW_MAPS"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWW_MAPS" ON "GWBASE"."GWW_MAPS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076195C00016$$" ON "GWBASE"."GWW_MAPS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076195C00013$$" ON "GWBASE"."GWW_MAPS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076195C00012$$" ON "GWBASE"."GWW_MAPS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076195C00009$$" ON "GWBASE"."GWW_MAPS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076195C00007$$" ON "GWBASE"."GWW_MAPS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076195C00005$$" ON "GWBASE"."GWW_MAPS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWW_MAPSERVICES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"NAME" NVARCHAR2(128), 
	"TITLE" NVARCHAR2(128), 
	"SERVICETYPE" NVARCHAR2(32), 
	"SERVICEVERSION" NVARCHAR2(16), 
	"DISPLAYTITLE" NVARCHAR2(128), 
	"ABSTRACT" CLOB, 
	"URL" CLOB, 
	"PROVIDERNAME" NVARCHAR2(128), 
	"PROVIDERURL" CLOB, 
	"SOURCENAME" NVARCHAR2(128), 
	"SOURCEURL" CLOB, 
	"FEES" CLOB, 
	"ACCESSCONSTRAINTS" CLOB, 
	"KEYWORDS" CLOB, 
	"CONTACT" CLOB, 
	"ATTRIBUTION" CLOB, 
	"AUTHORITYURLNAME" NVARCHAR2(64), 
	"AUTHORITYURLHREF" CLOB, 
	"IDENTIFIERAUTHORITY" NVARCHAR2(64), 
	"IDENTIFIERURL" CLOB, 
	"USERNAME" NVARCHAR2(64), 
	"USERPASSWORD" NVARCHAR2(64), 
	"SORTNO" NUMBER(10,0) DEFAULT 32000
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("ABSTRACT") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("URL") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("PROVIDERURL") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("SOURCEURL") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("FEES") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("ACCESSCONSTRAINTS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("KEYWORDS") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("CONTACT") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("ATTRIBUTION") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("AUTHORITYURLHREF") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("IDENTIFIERURL") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWW_MAPSERVICES" ON "GWBASE"."GWW_MAPSERVICES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWW_MAPSERVICES" ADD CONSTRAINT "PK_GWW_MAPSERVICES" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."PK_GWW_MAPSERVICES"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWW_MAPSERVICES" ON "GWBASE"."GWW_MAPSERVICES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00021$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00019$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00017$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00016$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00015$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00014$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00013$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00012$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00010$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00008$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076208C00007$$" ON "GWBASE"."GWW_MAPSERVICES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWW_PROFILES" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"FILENAME" NVARCHAR2(255) NOT NULL ENABLE, 
	"DIRECTORY" NVARCHAR2(255) NOT NULL ENABLE, 
	"TYPE" NUMBER(10,0), 
	"DISPLAYNAME" NVARCHAR2(128), 
	"DESCRIPTION" CLOB, 
	"DEFINITION" CLOB, 
	"GWW" NCHAR(1) DEFAULT '-', 
	"GWWFILEDATE" DATE, 
	"SORTNO" NUMBER(10,0) DEFAULT 32000
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("DESCRIPTION") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) 
 LOB ("DEFINITION") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWW_PROFILES" ON "GWBASE"."GWW_PROFILES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWW_PROFILES" ADD CONSTRAINT "PK_GWW_PROFILES" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."PK_GWW_PROFILES"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWW_PROFILES" ON "GWBASE"."GWW_PROFILES" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076231C00007$$" ON "GWBASE"."GWW_PROFILES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076231C00006$$" ON "GWBASE"."GWW_PROFILES" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWW_WEBCONFIG" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"WEBAREA_ID" NUMBER(10,0), 
	"WEBORG_ID" NUMBER(10,0), 
	"WEBORG_KRZ" NVARCHAR2(20), 
	"USERNAME" NVARCHAR2(50), 
	"USERPASSWORD" NVARCHAR2(50), 
	"WEBDOMAIN" NVARCHAR2(50), 
	"PATH" NVARCHAR2(50), 
	"REQUESTSCRIPT" NVARCHAR2(50), 
	"PORT" NUMBER(10,0), 
	"SSL" NCHAR(1) DEFAULT '-', 
	"CONNECTTIMEOUT" NUMBER(10,0) DEFAULT 5, 
	"READTIMEOUT" NUMBER(10,0) DEFAULT 20, 
	"HTTP_PARAMSOK" NCHAR(1) DEFAULT '-', 
	"FTP_USER" NVARCHAR2(50), 
	"FTP_PASSWORD" NVARCHAR2(50), 
	"FTP_SERVER" NVARCHAR2(50), 
	"FTP_PATH" NVARCHAR2(50), 
	"FTP_PORT" NUMBER(10,0), 
	"FTP_SSL" NCHAR(1) DEFAULT '-', 
	"FTP_PASSIVEMODE" NCHAR(1) DEFAULT '+', 
	"FTP_CONNECTTIMEOUT" NUMBER(10,0) DEFAULT 6, 
	"FTP_READTIMEOUT" NUMBER(10,0) DEFAULT 60, 
	"FTP_PARAMSOK" NCHAR(1) DEFAULT '-', 
	"PROXY_USER" NVARCHAR2(50), 
	"PROXY_PASSWORD" NVARCHAR2(50), 
	"PROXY_SERVER" NVARCHAR2(50), 
	"PROXY_PORT" NUMBER(10,0), 
	"FTPPROXY_USER" NVARCHAR2(50), 
	"FTPPROXY_PASSWORD" NVARCHAR2(50), 
	"FTPPROXY_SERVER" NVARCHAR2(50), 
	"FTPPROXY_PORT" NUMBER(10,0), 
	"FTPPROXY_HTTP" NCHAR(1) DEFAULT '-', 
	"FTPPROXY_HTTPAUTHMETHOD" NVARCHAR2(20), 
	"USAGEFOTOS" NCHAR(1) DEFAULT '+', 
	"USAGEWELLDOCUMENTS" NCHAR(1) DEFAULT '+', 
	"USAGELEVELS" NUMBER(10,0) DEFAULT 2, 
	"USAGEANANLYSES" NUMBER(10,0) DEFAULT 2, 
	"USAGELOGGER" NUMBER(10,0) DEFAULT 2, 
	"USAGERATES" NUMBER(10,0) DEFAULT 2, 
	"USAGEPRECIPITATE" NUMBER(10,0) DEFAULT 2, 
	"USAGECLIMATE" NUMBER(10,0) DEFAULT 2, 
	"USAGEANAMEDIUMWATER" NCHAR(1) DEFAULT '+', 
	"USAGEANAMEDIUMSOLID" NCHAR(1) DEFAULT '-', 
	"USAGEANAMEDIUMELUAT" NCHAR(1) DEFAULT '-', 
	"USAGEANAMEDIUMAIR" NCHAR(1) DEFAULT '-', 
	"USAGECATEGORIES" NCHAR(1) DEFAULT '+', 
	"USAGESUBPROJECTS" NCHAR(1) DEFAULT '+', 
	"USAGESYNONYMES" NCHAR(1) DEFAULT '+', 
	"USAGEVALUEMARKERS" NCHAR(1) DEFAULT '-', 
	"USAGELEVELCOMMENTS" NCHAR(1) DEFAULT '-', 
	"USAGELAYERS" NCHAR(1) DEFAULT '+', 
	"USAGEPROFILES" NCHAR(1) DEFAULT '+', 
	"USAGEPROJECTDOCUMENT" NCHAR(1) DEFAULT '+', 
	"GWBEPSG" NVARCHAR2(16), 
	"GWBEPSGNAME" NVARCHAR2(128), 
	"GWBUTMEPSG" NVARCHAR2(16), 
	"GWBUTMEPSGNAME" NVARCHAR2(128), 
	"GWWPREFEREDEPSGTYP" NUMBER(10,0), 
	"GWWPREFEREDEPSG" NVARCHAR2(16), 
	"GWWPREFEREDEPSGNAME" NVARCHAR2(128), 
	"PREFEREDMAPID" NUMBER(10,0), 
	"PROVEVALUELISTNO" NUMBER(10,0), 
	"WARNINGVALUELISTNO" NUMBER(10,0), 
	"LOGOIMG" BLOB, 
	"LOGINLOGOIMG" BLOB, 
	"LOGOFILE" NVARCHAR2(255), 
	"LOGINLOGOFILE" NVARCHAR2(255), 
	"LOGOPOSITION" NVARCHAR2(32) DEFAULT 'legBottom', 
	"LEVELCOMMENTSHASFLAG" NCHAR(1) DEFAULT '-', 
	"LEVELBGLNEGATIVE" NCHAR(1) DEFAULT '-', 
	"LEVELCOMMENTSFLAGDEFINITION" CLOB, 
	"LEVELCOMMENTSFLAGPREVIEW" BLOB
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("LOGOIMG") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("LOGINLOGOIMG") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("LEVELCOMMENTSFLAGDEFINITION") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) 
 LOB ("LEVELCOMMENTSFLAGPREVIEW") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWW_WEBCONFIG" ON "GWBASE"."GWW_WEBCONFIG" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWW_WEBCONFIG" ADD CONSTRAINT "PK_GWW_WEBCONFIG" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."PK_GWW_WEBCONFIG"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWW_WEBCONFIG" ON "GWBASE"."GWW_WEBCONFIG" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076236C00073$$" ON "GWBASE"."GWW_WEBCONFIG" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076236C00072$$" ON "GWBASE"."GWW_WEBCONFIG" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076236C00066$$" ON "GWBASE"."GWW_WEBCONFIG" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076236C00065$$" ON "GWBASE"."GWW_WEBCONFIG" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."GWW_WELLDATACOUNTS" 
   (	"MSID" NUMBER(10,0) NOT NULL ENABLE, 
	"COUNTLV" NUMBER(10,0), 
	"COUNTAN" NUMBER(10,0), 
	"COUNTLG" NUMBER(10,0), 
	"COUNTRT" NUMBER(10,0), 
	"COUNTRN" NUMBER(10,0), 
	"COUNTCL" NUMBER(10,0), 
	"COUNTDO" NUMBER(10,0)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."PK_GWW_WELLDATACOUNTS" ON "GWBASE"."GWW_WELLDATACOUNTS" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."GWW_WELLDATACOUNTS" ADD CONSTRAINT "PK_GWW_WELLDATACOUNTS" PRIMARY KEY ("MSID")
  USING INDEX "GWBASE"."PK_GWW_WELLDATACOUNTS"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_GWW_WELLDATACOUNTS" ON "GWBASE"."GWW_WELLDATACOUNTS" ("MSID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."LOGDATA" 
   (	"MSKENNNR" VARCHAR2(20), 
	"MSID" NUMBER(10,0), 
	"LD_LOGRECID" NUMBER(10,0), 
	"LD_RECID" NUMBER(10,0), 
	"LD_DEPTH" NUMBER(10,2), 
	"LD_VALUE" NUMBER(10,2)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."LOGS" 
   (	"MSKENNNR" VARCHAR2(20), 
	"MSID" NUMBER(10,0), 
	"RECID" NUMBER(10,0), 
	"DATUM" DATE, 
	"ANFANG" NUMBER(10,2), 
	"ENDE" NUMBER(10,2), 
	"NOTIZ" VARCHAR2(250), 
	"METHODE_K" VARCHAR2(5), 
	"METHODE_N" VARCHAR2(100)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."REPITEMS" 
   (	"ID" NUMBER(10,0) NOT NULL ENABLE, 
	"REPORTTYPE" NUMBER(10,0) NOT NULL ENABLE, 
	"NAME" VARCHAR2(50) NOT NULL ENABLE, 
	"TEMPLATE" BLOB, 
	"PROJECT" VARCHAR2(50)
   ) SEGMENT CREATION DEFERRED 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  TABLESPACE "USERS" 
 LOB ("TEMPLATE") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES ) ;
  CREATE UNIQUE INDEX "GWBASE"."REPITEMS_PK" ON "GWBASE"."REPITEMS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."REPITEMS" ADD CONSTRAINT "REPITEMS_PK" PRIMARY KEY ("ID")
  USING INDEX "GWBASE"."REPITEMS_PK"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."REPITEMS_PK" ON "GWBASE"."REPITEMS" ("ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076248C00004$$" ON "GWBASE"."REPITEMS" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE( INITIAL 65536 NEXT 1048576 MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."RST_APPCONFIG" 
   (	"MANDANT_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MODULE_ID" NVARCHAR2(16) NOT NULL ENABLE, 
	"KEY_" NVARCHAR2(100) NOT NULL ENABLE, 
	"VALUE_I" NUMBER(10,0), 
	"VALUE_F" BINARY_DOUBLE, 
	"VALUE_S" CLOB, 
	"VALUE_DT" DATE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
 LOB ("VALUE_S") STORE AS SECUREFILE (
  TABLESPACE "USERS" ENABLE STORAGE IN ROW 4000 CHUNK 8192
  NOCACHE LOGGING  NOCOMPRESS  KEEP_DUPLICATES 
  STORAGE(INITIAL 262144 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) ;
  CREATE UNIQUE INDEX "GWBASE"."PK_RST_APPCONFIG" ON "GWBASE"."RST_APPCONFIG" ("MANDANT_ID", "MODULE_ID", "KEY_") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."RST_APPCONFIG" ADD CONSTRAINT "PK_RST_APPCONFIG" PRIMARY KEY ("MANDANT_ID", "MODULE_ID", "KEY_")
  USING INDEX "GWBASE"."PK_RST_APPCONFIG"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_RST_APPCONFIG" ON "GWBASE"."RST_APPCONFIG" ("MANDANT_ID", "MODULE_ID", "KEY_") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."SYS_IL0000076251C00006$$" ON "GWBASE"."RST_APPCONFIG" (
  PCTFREE 10 INITRANS 2 MAXTRANS 255 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" 
  PARALLEL (DEGREE 0 INSTANCES 0) ;
;

CREATE TABLE "GWBASE"."RST_DBVERSION" 
   (	"MANDANT_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MODULE_ID" NVARCHAR2(32) NOT NULL ENABLE, 
	"VERSION" NUMBER(10,0)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."PK_RST_DBVERSION" ON "GWBASE"."RST_DBVERSION" ("MANDANT_ID", "MODULE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."RST_DBVERSION" ADD CONSTRAINT "PK_RST_DBVERSION" PRIMARY KEY ("MANDANT_ID", "MODULE_ID")
  USING INDEX "GWBASE"."PK_RST_DBVERSION"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_RST_DBVERSION" ON "GWBASE"."RST_DBVERSION" ("MANDANT_ID", "MODULE_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE TABLE "GWBASE"."RST_SYNCHRONIZE" 
   (	"MANDANT_ID" NUMBER(10,0) NOT NULL ENABLE, 
	"MODULE_ID" NVARCHAR2(16) NOT NULL ENABLE, 
	"ACTION_" NVARCHAR2(32) NOT NULL ENABLE, 
	"SESSIONGUID" NVARCHAR2(70), 
	"TIMESTAMP_" DATE, 
	"VALUE_I" NUMBER(10,0), 
	"VALUE_S" NVARCHAR2(255)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
  CREATE UNIQUE INDEX "GWBASE"."PK_RST_SYNCHRONIZE" ON "GWBASE"."RST_SYNCHRONIZE" ("MANDANT_ID", "MODULE_ID", "ACTION_") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
ALTER TABLE "GWBASE"."RST_SYNCHRONIZE" ADD CONSTRAINT "PK_RST_SYNCHRONIZE" PRIMARY KEY ("MANDANT_ID", "MODULE_ID", "ACTION_")
  USING INDEX "GWBASE"."PK_RST_SYNCHRONIZE"  ENABLE;

CREATE UNIQUE INDEX "GWBASE"."PK_RST_SYNCHRONIZE" ON "GWBASE"."RST_SYNCHRONIZE" ("MANDANT_ID", "MODULE_ID", "ACTION_") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" ;
;

CREATE SEQUENCE GWBASE.SEQ_AI_GWB_VALUEMARKERS INCREMENT BY 1 MINVALUE 1 MAXVALUE 9999999999999999999999999999 NOCYCLE CACHE 100 NOORDER ;