

-- Generated by Relational Schema Center on Mon Aug 02 15:12:12 CDT 2004 for DB2 Universal Database V8.2


CREATE TABLE CUSTOMERENT
  (OCC_CUSTOMERENT BIGINT NOT NULL DEFAULT 0,
   CUSTOMERID INTEGER NOT NULL,
   SINCE DATE,
   BALANCE DECIMAL(10, 2),
   CREDIT VARCHAR(250),
   CREDITLIMIT DECIMAL(10, 2),
   YTDPAYMENT DECIMAL(10, 2),
   PHONE VARCHAR(250),
   ZIP VARCHAR(250),
   COUNTRY VARCHAR(250),
   STATE1 VARCHAR(250),
   CITY VARCHAR(250),
   STREET2 VARCHAR(250),
   STREET1 VARCHAR(250),
   CONTACT VARCHAR(250),
   LASTNAME VARCHAR(250),
   FIRSTNAME VARCHAR(250));

ALTER TABLE CUSTOMERENT
  ADD CONSTRAINT PK_CUSTOMERENT PRIMARY KEY (CUSTOMERID);

CREATE TABLE CUSTOMERINVENTORYENT
  (OCC_CUSTOMERINVENTORYENT BIGINT NOT NULL DEFAULT 0,
   QUANTITY INTEGER NOT NULL,
   ID INTEGER NOT NULL,
   ITEMID VARCHAR(250),
   CUSTOMERID INTEGER,
   VALUE1 DECIMAL(10, 2),
   CUSTOMER_CUSTOMERID INTEGER);

ALTER TABLE CUSTOMERINVENTORYENT
  ADD CONSTRAINT PK_CUSTOMERINVENT1 PRIMARY KEY (ID);