--------------------------------------------------------
--  File created - Wednesday-September-30-2015   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table LU_MAD_HDATUM
--------------------------------------------------------

  CREATE TABLE "STORETW"."LU_MAD_HDATUM" 
   (	"PK_ISN" NUMBER(12,0), 
	"ID_CODE" VARCHAR2(12 CHAR), 
	"HORIZONTAL_DATUM" VARCHAR2(254 CHAR)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 90 INITRANS 1 MAXTRANS 255 
 COMPRESS FOR OLTP NOLOGGING
  STORAGE(INITIAL 10485760 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "STORETDATA_STORMODP" 
   CACHE ;

   COMMENT ON COLUMN "STORETW"."LU_MAD_HDATUM"."PK_ISN" IS 'Primary Key. Generated using sequence object SEQ_MAD_HDATUM.';
   COMMENT ON COLUMN "STORETW"."LU_MAD_HDATUM"."ID_CODE" IS 'A cryptic ID code assigned through EPA Locational Data Policy to represent the Method or Datum referenced.';
   COMMENT ON COLUMN "STORETW"."LU_MAD_HDATUM"."HORIZONTAL_DATUM" IS 'Horizontal Datum';
   COMMENT ON TABLE "STORETW"."LU_MAD_HDATUM"  IS 'Horizontal Datum lookup table';
REM INSERTING into STORETW.LU_MAD_HDATUM
SET DEFINE OFF;
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (1,'AMSMA','American Samoa Datum');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (2,'ASTRO','Midway Astro 1961');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (3,'GUAM','Guam 1963');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (4,'JHNSN','Johnson Island 1961');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (5,'NAD27','North American Datum 1927');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (6,'NAD83','North American Datum 1983');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (7,'OLDHI','Old Hawaiian Datum');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (8,'OTHER','Other');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (9,'PR','Puerto Rico Datum');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (10,'SGEOR','St. George Island Datum');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (11,'SLAWR','St. Lawrence Island Datum');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (12,'SPAUL','St. Paul Island Datum');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (13,'UNKWN','Unknown');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (14,'WAKE','Wake-Eniwetok 1960');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (15,'WGS72','World Geodetic System 1972');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (16,'WGS84','World Geodetic System 1984');
Insert into STORETW.LU_MAD_HDATUM (PK_ISN,ID_CODE,HORIZONTAL_DATUM) values (3671,'HARN','High Accuracy Reference Network for NAD83');
--------------------------------------------------------
--  DDL for Index MAD_HDATUM01
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."MAD_HDATUM01" ON "STORETW"."LU_MAD_HDATUM" ("ID_CODE") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING 
  STORAGE(INITIAL 196608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "STORETINDX_STORMODP" ;
--------------------------------------------------------
--  DDL for Index PK_MAD_HDATUM
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."PK_MAD_HDATUM" ON "STORETW"."LU_MAD_HDATUM" ("PK_ISN") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING 
  STORAGE(INITIAL 196608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "STORETDATA_STORMODP" ;
--------------------------------------------------------
--  Constraints for Table LU_MAD_HDATUM
--------------------------------------------------------

  ALTER TABLE "STORETW"."LU_MAD_HDATUM" ADD CONSTRAINT "PK_MAD_HDATUM" PRIMARY KEY ("PK_ISN")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING 
  STORAGE(INITIAL 196608 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "STORETDATA_STORMODP"  ENABLE;
  ALTER TABLE "STORETW"."LU_MAD_HDATUM" MODIFY ("ID_CODE" NOT NULL ENABLE);
