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

  CREATE TABLE "STORETW"."DI_ORG_TYPES" 
   (	"PK_ISN" NUMBER(12,0), 
	"ORGANIZATION_TYPE" VARCHAR2(256 BYTE), 
	"SORT_ORDER" NUMBER
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 255 
 COMPRESS FOR OLTP NOLOGGING
  STORAGE(INITIAL 1048576 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" ;

   COMMENT ON COLUMN "STORETW"."DI_ORG_TYPES"."PK_ISN" IS 'Primary Key. Generated using sequence object SEQ_ORG_TYPES.';
   COMMENT ON COLUMN "STORETW"."DI_ORG_TYPES"."ORGANIZATION_TYPE" IS 'The code that represents the primary type designation of a Organization.';
   COMMENT ON COLUMN "STORETW"."DI_ORG_TYPES"."SORT_ORDER" IS 'Sort order for station type selection box on web pages';
   COMMENT ON TABLE "STORETW"."DI_ORG_TYPES"  IS 'Organization types dimension table';
REM INSERTING into STORETW.DI_ORG_TYPES
SET DEFINE OFF;
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (9,'Tribal',9);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (100,'BEACH Program Organization',20);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (101,'CERCLA Superfund Organization',21);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (10,'Interstate Comsn/US Government',10);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (1,'Federal/US Government',1);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (2,'State/US Government',2);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (3,'Local/US Government',3);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (4,'Mexican Government/State',4);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (5,'Private Non-Industrial',5);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (6,'University/College',6);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (7,'Private Industry',7);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (8,'Volunteer',8);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (110,'River Rally River Network',30);
Insert into STORETW.DI_ORG_TYPES (PK_ISN,ORGANIZATION_TYPE,SORT_ORDER) values (111,'Izaak Walton League ',31);
--------------------------------------------------------
--  DDL for Index PK_ORG_TYPES
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."PK_ORG_TYPES" ON "STORETW"."DI_ORG_TYPES" ("PK_ISN") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING 
  STORAGE(INITIAL 65536 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 DI_ORG_TYPES
--------------------------------------------------------

  ALTER TABLE "STORETW"."DI_ORG_TYPES" ADD CONSTRAINT "PK_ORG_TYPES" PRIMARY KEY ("PK_ISN")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS NOLOGGING 
  STORAGE(INITIAL 65536 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"."DI_ORG_TYPES" MODIFY ("ORGANIZATION_TYPE" NOT NULL ENABLE);
  ALTER TABLE "STORETW"."DI_ORG_TYPES" MODIFY ("PK_ISN" NOT NULL ENABLE);
