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

  CREATE TABLE "STORETW"."DI_GROUP_TYPE" 
   (	"PK_ISN" NUMBER(12,0), 
	"BIO_GROUP_TYPE" VARCHAR2(32 BYTE)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 90 INITRANS 1 MAXTRANS 255 
 COMPRESS FOR OLTP NOLOGGING
  STORAGE(INITIAL 327680 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_GROUP_TYPE"."PK_ISN" IS 'Primary Key. Generated using sequence object SEQ_GROUP_TYPE.';
   COMMENT ON COLUMN "STORETW"."DI_GROUP_TYPE"."BIO_GROUP_TYPE" IS 'The name of the kind of group.  Examples include:  1. population census by taxon (non- duplicative species count)    2. Coliform bacteria census by taxon    3. Single taxon frequency class    4. Single taxon group summary    5. Single taxon individual';
   COMMENT ON TABLE "STORETW"."DI_GROUP_TYPE"  IS 'Group type dimension table';
REM INSERTING into STORETW.DI_GROUP_TYPE
SET DEFINE OFF;
Insert into STORETW.DI_GROUP_TYPE (PK_ISN,BIO_GROUP_TYPE) values (1,'Multi-Taxon Population Census');
Insert into STORETW.DI_GROUP_TYPE (PK_ISN,BIO_GROUP_TYPE) values (2,'Single Taxon Frequency Classes');
Insert into STORETW.DI_GROUP_TYPE (PK_ISN,BIO_GROUP_TYPE) values (3,'Single Taxon Group Summary');
Insert into STORETW.DI_GROUP_TYPE (PK_ISN,BIO_GROUP_TYPE) values (4,'Single Taxon Individuals');
--------------------------------------------------------
--  DDL for Index PK_GROUP_TYPE
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."PK_GROUP_TYPE" ON "STORETW"."DI_GROUP_TYPE" ("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 "STORETINDX_STORMODP" ;
--------------------------------------------------------
--  Constraints for Table DI_GROUP_TYPE
--------------------------------------------------------

  ALTER TABLE "STORETW"."DI_GROUP_TYPE" ADD CONSTRAINT "PK_GROUP_TYPE" 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 "STORETINDX_STORMODP"  ENABLE;
  ALTER TABLE "STORETW"."DI_GROUP_TYPE" MODIFY ("BIO_GROUP_TYPE" NOT NULL ENABLE);
  ALTER TABLE "STORETW"."DI_GROUP_TYPE" MODIFY ("PK_ISN" NOT NULL ENABLE);
