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

  CREATE TABLE "STORETW"."DI_COMMUNITY_SAMPLED" 
   (	"PK_ISN" NUMBER(12,0), 
	"ACTIVITY_COMMUNITY" VARCHAR2(256 BYTE), 
	"ACTIVITY_COMMUNITY_DESC" VARCHAR2(4000 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_COMMUNITY_SAMPLED"."PK_ISN" IS 'Primary Key. Generated using sequence object SEQ_COMMUNITY_SAMPLED.';
   COMMENT ON COLUMN "STORETW"."DI_COMMUNITY_SAMPLED"."ACTIVITY_COMMUNITY" IS 'The name of the Biological Community from which the Sample was taken.   Note: This is only valid when MEDIUM_TYPE_NAME is BIOLOGICAL and INTENT_TYPE_NAME is TAXON ABUNDANCE.';
   COMMENT ON COLUMN "STORETW"."DI_COMMUNITY_SAMPLED"."ACTIVITY_COMMUNITY_DESC" IS 'Activity Community Description';
   COMMENT ON TABLE "STORETW"."DI_COMMUNITY_SAMPLED"  IS 'Community Sampled dimension table';
REM INSERTING into STORETW.DI_COMMUNITY_SAMPLED
SET DEFINE OFF;
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (1,'Amphibians','Amphibian community.  Frogs, toads, etc.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (2,'Aquatic Vegetation','Plants normally found growing in the water column, either partially or totally submerged.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (3,'Bacteria/Virus','Microbiological pathogens.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (4,'Benthic Macroinvertebrates','Invertebrate animals inhabiting the bottom of a water body.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (5,'Corals','Corals');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (6,'Fish/Nekton','Fish or other animals inhabiting the water column between the surface and the bottom.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (7,'Ichthyoplankton','Fish-like animals of near-micrcscopic dimensions.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (8,'Mammals','Warm-blooded hairy milk-producing animals.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (9,'Periphyton','Near-microscopic plant material found attached to solid surfaces submerged in the aquatic environment.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (10,'Phytoplankton/Zooplankton','Near-microscopic plants and animals found in the water column between the surface and the bottom.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (51,'Terrestrial Vegetation','Plants normally found growing out of water.  Trees, shrubs, grasses, etc.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (52,'Birds','Birds.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (53,'Reptiles','Snakes, lizards, turtles, etc.');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (54,'Fungi','Fungi');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (55,'Invertebrates','Invertebrate animals is without a vertebral column or lacking backbone/spinal column');
Insert into STORETW.DI_COMMUNITY_SAMPLED (PK_ISN,ACTIVITY_COMMUNITY,ACTIVITY_COMMUNITY_DESC) values (281,'Sedimented Diatoms','Preserved diatoms found in sediment profiles');
--------------------------------------------------------
--  DDL for Index ICOSACTCOMM
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."ICOSACTCOMM" ON "STORETW"."DI_COMMUNITY_SAMPLED" (UPPER("ACTIVITY_COMMUNITY")) 
  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_COMMUNITY_SAMPLED
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."PK_COMMUNITY_SAMPLED" ON "STORETW"."DI_COMMUNITY_SAMPLED" ("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_COMMUNITY_SAMPLED
--------------------------------------------------------

  ALTER TABLE "STORETW"."DI_COMMUNITY_SAMPLED" ADD CONSTRAINT "PK_COMMUNITY_SAMPLED" 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_COMMUNITY_SAMPLED" MODIFY ("ACTIVITY_COMMUNITY" NOT NULL ENABLE);
  ALTER TABLE "STORETW"."DI_COMMUNITY_SAMPLED" MODIFY ("PK_ISN" NOT NULL ENABLE);
