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

  CREATE TABLE "STORETW"."DI_ACTIVITY_MEDIUM" 
   (	"PK_ISN" NUMBER(12,0), 
	"ACTIVITY_MEDIUM" VARCHAR2(20 BYTE)
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 90 INITRANS 1 MAXTRANS 255 
 COMPRESS FOR OLTP NOLOGGING
  STORAGE(INITIAL 589824 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"."DI_ACTIVITY_MEDIUM"."PK_ISN" IS 'Primary Key. Generated using sequence object SEQ_ACTIVITY_MEDIUM.';
   COMMENT ON COLUMN "STORETW"."DI_ACTIVITY_MEDIUM"."ACTIVITY_MEDIUM" IS 'The name of the medium or matrix where the Field Activity occurred.';
   COMMENT ON TABLE "STORETW"."DI_ACTIVITY_MEDIUM"  IS 'Activity medium dimension table';
REM INSERTING into STORETW.DI_ACTIVITY_MEDIUM
SET DEFINE OFF;
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (1,'Water');
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (2,'Sediment');
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (3,'Biological');
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (4,'Soil');
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (5,'Air');
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (6,'Other');
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (7,'QC');
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (48,'Tissue');
Insert into STORETW.DI_ACTIVITY_MEDIUM (PK_ISN,ACTIVITY_MEDIUM) values (49,'Habitat');
--------------------------------------------------------
--  DDL for Index IACT_MEDIUM01
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."IACT_MEDIUM01" ON "STORETW"."DI_ACTIVITY_MEDIUM" ("ACTIVITY_MEDIUM") 
  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 IACT_MEDIUM02
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."IACT_MEDIUM02" ON "STORETW"."DI_ACTIVITY_MEDIUM" (UPPER("ACTIVITY_MEDIUM")) 
  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_ACT_MEDIUM
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."PK_ACT_MEDIUM" ON "STORETW"."DI_ACTIVITY_MEDIUM" ("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_MEDIUM
--------------------------------------------------------

  ALTER TABLE "STORETW"."DI_ACTIVITY_MEDIUM" ADD CONSTRAINT "PK_ACT_MEDIUM" 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;
