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

  CREATE TABLE "STORETW"."DI_ACTIVITY_INTENT" 
   (	"PK_ISN" NUMBER(12,0), 
	"ACTIVITY_INTENT" VARCHAR2(256 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_ACTIVITY_INTENT"."PK_ISN" IS 'Primary Key. Generated using sequence object SEQ_ACTIVITY_INTENT.';
   COMMENT ON COLUMN "STORETW"."DI_ACTIVITY_INTENT"."ACTIVITY_INTENT" IS 'The primary reason the Field Activity occurred.   Note: This is mandatory for Biological Medium, and not available for other media.';
   COMMENT ON TABLE "STORETW"."DI_ACTIVITY_INTENT"  IS 'Activity Intent Dimension table';
REM INSERTING into STORETW.DI_ACTIVITY_INTENT
SET DEFINE OFF;
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (1,'Individual');
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (2,'Taxon Abundance');
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (3,'Tissue');
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (41,'Population Census');
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (42,'Group Summary');
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (43,'Frequency Class');
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (44,'Toxicity');
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (2011,'Species Density');
Insert into STORETW.DI_ACTIVITY_INTENT (PK_ISN,ACTIVITY_INTENT) values (2021,'Targeted Sampling');
--------------------------------------------------------
--  DDL for Index IAIACTIVITYINT
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."IAIACTIVITYINT" ON "STORETW"."DI_ACTIVITY_INTENT" (UPPER("ACTIVITY_INTENT")) 
  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 "STORETINDX_STORMODP" ;
--------------------------------------------------------
--  DDL for Index PK_ACTIVITY_INTENT
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."PK_ACTIVITY_INTENT" ON "STORETW"."DI_ACTIVITY_INTENT" ("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_ACTIVITY_INTENT
--------------------------------------------------------

  ALTER TABLE "STORETW"."DI_ACTIVITY_INTENT" ADD CONSTRAINT "PK_ACTIVITY_INTENT" 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_ACTIVITY_INTENT" MODIFY ("ACTIVITY_INTENT" NOT NULL ENABLE);
  ALTER TABLE "STORETW"."DI_ACTIVITY_INTENT" MODIFY ("PK_ISN" NOT NULL ENABLE);
