/*==============================================================*/ /* Table: ORDER_HEADER */ /*==============================================================*/ create table ORDER_HEADER ( ORDER_HEADER_ID NUMBER not null, ORDER_HEADER_NAME CHAR(254) not null, constraint PK_ORDER_HEADER primary key (ORDER_HEADER_ID) ); comment on table ORDER_HEADER is 'this is the header info for sales'; /*==============================================================*/ /* Table: ORDER_DETAIL */ /*==============================================================*/ create table ORDER_DETAIL ( ORDER_HEADER_ID NUMBER, ORDER_DETAIL_ID NUMBER, ITEM_NAME CHAR(254), ORDER_QUANTITY NUMBER, constraint FK_ORDER_DE_HAS_DETAI_ORDER_HE foreign key (ORDER_HEADER_ID) references ORDER_HEADER (ORDER_HEADER_ID) ); comment on table ORDER_DETAIL is 'this is detail info for order'; /*==============================================================*/ /* Index: HAS_DETAILS_FK */ /*==============================================================*/ create index HAS_DETAILS_FK on ORDER_DETAIL ( ORDER_HEADER_ID ASC );