--
-- Type: TABLE; Owner: BIOMART; Name: BIO_DATA_ATTRIBUTE
--
 CREATE TABLE "BIOMART"."BIO_DATA_ATTRIBUTE" 
  (	"BIO_DATA_ATTRIBUTE_ID" NUMBER(18,0) NOT NULL ENABLE, 
"PROPERTY_CODE" NVARCHAR2(200) NOT NULL ENABLE, 
"PROPERTY_VALUE" NVARCHAR2(200), 
"BIO_DATA_ID" NUMBER(18,0) NOT NULL ENABLE, 
"PROPERTY_UNIT" NVARCHAR2(100), 
 CONSTRAINT "BIO_DATA_ATTR_PK" PRIMARY KEY ("BIO_DATA_ATTRIBUTE_ID")
 USING INDEX
 TABLESPACE "INDX"  ENABLE
  ) SEGMENT CREATION IMMEDIATE
 TABLESPACE "TRANSMART" ;

--
-- Type: TRIGGER; Owner: BIOMART; Name: TRG_BIO_DATA_ATTR_ID
--
  CREATE OR REPLACE TRIGGER "BIOMART"."TRG_BIO_DATA_ATTR_ID" before insert on "BIO_DATA_ATTRIBUTE"    for each row begin     if inserting then       if :NEW."BIO_DATA_ATTRIBUTE_ID" is null then          select SEQ_BIO_DATA_ID.nextval into :NEW."BIO_DATA_ATTRIBUTE_ID" from dual;       end if;    end if; end;












/
ALTER TRIGGER "BIOMART"."TRG_BIO_DATA_ATTR_ID" ENABLE;
 
