

-- Generated by Relational Schema Center on Fri Jul 30 19:19:40 CDT 2004 for DB2 Universal Database V8.2


CREATE TABLE ORDERLINEENT
  (OCC_ORDERLINEENT BIGINT NOT NULL DEFAULT 0,
   SHIPDATE DATE,
   QUANTITY INTEGER NOT NULL,
   ITEMID VARCHAR(250),
   ORDERID INTEGER NOT NULL,
   ID INTEGER NOT NULL,
   TOTALVALUE DECIMAL(10, 2),
   OLINESTATUS INTEGER NOT NULL,
   MSRPATPURCHASE DECIMAL(10, 2),
   ORDLINESORDERENTINVERSE_ID INTEGER);

ALTER TABLE ORDERLINEENT
  ADD CONSTRAINT PK_ORDERLINEENT PRIMARY KEY (ID, ORDERID);

CREATE TABLE ITEMENT
  (OCC_ITEMENT BIGINT NOT NULL DEFAULT 0,
   DISCOUNT DECIMAL(10, 2),
   DESCRIPTION VARCHAR(250),
   NAME VARCHAR(250),
   PRICE DECIMAL(10, 2),
   ID VARCHAR(250) NOT NULL,
   CATEGORY INTEGER NOT NULL);

ALTER TABLE ITEMENT
  ADD CONSTRAINT PK_ITEMENT PRIMARY KEY (ID);

CREATE TABLE ORDERENT
  (OCC_ORDERENT BIGINT NOT NULL DEFAULT 0,
   ORDERSTATUS INTEGER NOT NULL,
   SHIPDATE DATE,
   ENTRYDATE TIMESTAMP,
   TOTAL DECIMAL(10, 2),
   DISCOUNT DECIMAL(10, 2),
   ORDERLINECOUNT INTEGER NOT NULL,
   CUSTOMERID INTEGER NOT NULL,
   ID INTEGER NOT NULL);

ALTER TABLE ORDERENT
  ADD CONSTRAINT PK_ORDERENT PRIMARY KEY (ID);