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

  CREATE TABLE "STORETW"."DI_BIOPART" 
   (	"PK_ISN" NUMBER(12,0), 
	"BIOPART_NAME" 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_BIOPART"."PK_ISN" IS 'Primary Key. Generated using sequence object SEQ_BIOPART.';
   COMMENT ON COLUMN "STORETW"."DI_BIOPART"."BIOPART_NAME" IS 'The foreign key to TSRBIOPT inplements "One Biopart (tissue, organ) may be the subject tissue for many Field Activities/Samples whose medium is biological and whose intent is Tissue.';
   COMMENT ON TABLE "STORETW"."DI_BIOPART"  IS 'Biopart dimension table';
REM INSERTING into STORETW.DI_BIOPART
SET DEFINE OFF;
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (1,'Body');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (2,'Edible portion');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (3,'Fish fillet, homog., skin off');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4,'Fish fillet, homog., skin on');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (5,'Fish fillet, right, skin on');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (6,'Fish fillet, whole, skin off');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (7,'Fish fillet, whole, skin on');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (8,'Leaf');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (9,'Liver');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (10,'Mixed parts');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (11,'Muscle, visceral');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (12,'Muscle/muscle tissue');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (13,'Stem');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (14,'Whole fish, homog., skin off');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (15,'Whole fish, homog., skin on');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (16,'Whole organism');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (17,'Whole, not gut');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (51,'Body Wall');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (52,'Skin');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (53,'Skeleton');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (54,'Bone Tissue');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (55,'Bone, Acellular');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (56,'Bone, Cellular');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (57,'Bone, Marrow');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (58,'Gut');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (59,'Hind Gut');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (60,'Fore Gut');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (61,'Muscle, Somatic');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (62,'Connective Tissue');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (63,'Fat/Adipose Tissue');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (64,'Nerve Tissue');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (65,'Blood');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (66,'Blood Plasma');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (67,'Saliva');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (68,'Milk');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (69,'Feces');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (70,'Urine');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (71,'Ear');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (72,'Eye');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (73,'Brain');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (74,'Heart');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (75,'Lung');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (76,'Abdomen');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (77,'Kidney');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (78,'Adrenal');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (79,'Thymus');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (80,'Spleen');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (81,'Liver, Edible Portion');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (82,'Gall Bladder');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (83,'Bile');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (84,'Pancreas');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (85,'Stomach');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (86,'Intestine');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (87,'Digestive Gland');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (88,'Head');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (89,'Arm');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (90,'Foot');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (91,'Ovary');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (92,'Testes');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (93,'Egg/Ovum');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (94,'Tentacles');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (95,'Fish Fillet, Left, Skin On');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (96,'Fish Fillet, Left, Skin Off');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (97,'Fish Fillet, Right, Skin Off');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (98,'Fish Fillet, With Belly Flap');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (99,'Otoliths');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (100,'Gills');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (101,'Gill Rakers');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (102,'Fish Scales');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (103,'Fin');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (104,'Wing');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (105,'Feather');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (106,'Bark');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (107,'Wood');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (108,'Root');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (109,'Root/Tuber');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (110,'Flower');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (111,'Pistil');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (112,'Stamen');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (113,'Fruit');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (114,'Seed');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (115,'Heptaopancreas');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (116,'Carapace');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (3461,'Non-Lethal Fish Tissue Plug');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (2331,'Gonads');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (3944,'Fish Fillet,Scaleless, Skin On');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4224,'Whole Bird, Featherless,SkinOf');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4225,'Blood,Metatarsal,prim coll sit');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4226,'Whole Bird, Featherless,SkinOn');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4227,'Blood,Brachial,prim coll site');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4228,'Blood,Metatarsal+Brachial, pcs');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4229,'Blood,Jugular+Metatarsal, pcs');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4230,'Whole Bird, Feathers, Skin On');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4231,'Blood,Jugular,prim coll site');
Insert into STORETW.DI_BIOPART (PK_ISN,BIOPART_NAME) values (4232,'Whole Bird, Feathers, Skin Off');
--------------------------------------------------------
--  DDL for Index IBPRBIOPARTNAME
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."IBPRBIOPARTNAME" ON "STORETW"."DI_BIOPART" (UPPER("BIOPART_NAME")) 
  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_BIOPART
--------------------------------------------------------

  CREATE UNIQUE INDEX "STORETW"."PK_BIOPART" ON "STORETW"."DI_BIOPART" ("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_BIOPART
--------------------------------------------------------

  ALTER TABLE "STORETW"."DI_BIOPART" ADD CONSTRAINT "PK_BIOPART" 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_BIOPART" MODIFY ("BIOPART_NAME" NOT NULL ENABLE);
  ALTER TABLE "STORETW"."DI_BIOPART" MODIFY ("PK_ISN" NOT NULL ENABLE);
