CREATE TABLE CUSTOMER(CUSTOMER_ID INTEGER,ACCOUNT_NUM DOUBLE,LNAME VARCHAR,FNAME VARCHAR,MI VARCHAR,ADDRESS1 VARCHAR,ADDRESS2 VARCHAR,ADDRESS3 VARCHAR,ADDRESS4 VARCHAR,CITY VARCHAR,STATE_PROVINCE VARCHAR,POSTAL_CODE VARCHAR,COUNTRY VARCHAR,CUSTOMER_REGION_ID INTEGER,PHONE1 VARCHAR,PHONE2 VARCHAR,BIRTHDATE TIMESTAMP,MARITAL_STATUS VARCHAR,YEARLY_INCOME VARCHAR,GENDER VARCHAR,TOTAL_CHILDREN SMALLINT,NUM_CHILDREN_AT_HOME SMALLINT,EDUCATION VARCHAR,DATE_ACCNT_OPENED TIMESTAMP);
CREATE TABLE DAYS(DAY INTEGER,WEEK_DAY VARCHAR);
CREATE TABLE INVENTORY_FACT_1997(PRODUCT_ID INTEGER,TIME_ID INTEGER,WAREHOUSE_ID INTEGER,STORE_ID INTEGER,UNITS_ORDERED DOUBLE,UNITS_SHIPPED INTEGER,WAREHOUSE_SALES NUMERIC,WAREHOUSE_COST NUMERIC,SUPPLY_TIME SMALLINT,STORE_INVOICE NUMERIC);
CREATE TABLE INVENTORY_FACT_1998(PRODUCT_ID INTEGER,TIME_ID INTEGER,WAREHOUSE_ID INTEGER,STORE_ID INTEGER,UNITS_ORDERED DOUBLE,UNITS_SHIPPED INTEGER,WAREHOUSE_SALES NUMERIC,WAREHOUSE_COST NUMERIC,SUPPLY_TIME SMALLINT,STORE_INVOICE NUMERIC);
CREATE TABLE PRODUCT(PRODUCT_CLASS_ID INTEGER,PRODUCT_ID INTEGER,BRAND_NAME VARCHAR,PRODUCT_NAME VARCHAR,SKU DOUBLE,SRP NUMERIC,GROSS_WEIGHT REAL,NET_WEIGHT REAL,RECYCLABLE_PACKAGE BIT,LOW_FAT BIT,UNITS_PER_CASE SMALLINT,CASES_PER_PALLET SMALLINT,SHELF_WIDTH REAL,SHELF_HEIGHT REAL,SHELF_DEPTH REAL);
CREATE TABLE PRODUCT_CLASS(PRODUCT_CLASS_ID INTEGER,PRODUCT_SUBCATEGORY VARCHAR,PRODUCT_CATEGORY VARCHAR,PRODUCT_DEPARTMENT VARCHAR,PRODUCT_FAMILY VARCHAR);
CREATE TABLE PROMOTION(PROMOTION_ID INTEGER,PROMOTION_DISTRICT_ID INTEGER,PROMOTION_NAME VARCHAR,MEDIA_TYPE VARCHAR,COST DOUBLE,START_DATE TIMESTAMP,END_DATE TIMESTAMP);
CREATE TABLE REGION(REGION_ID INTEGER,SALES_CITY VARCHAR,SALES_STATE_PROVINCE VARCHAR,SALES_DISTRICT VARCHAR,SALES_REGION VARCHAR,SALES_COUNTRY VARCHAR,SALES_DISTRICT_ID INTEGER);
CREATE TABLE SALES_FACT_1997(PRODUCT_ID INTEGER,TIME_ID INTEGER,CUSTOMER_ID INTEGER,PROMOTION_ID INTEGER,STORE_ID INTEGER,STORE_SALES NUMERIC,STORE_COST NUMERIC,UNIT_SALES DOUBLE);
CREATE TABLE SALES_FACT_1998(PRODUCT_ID INTEGER,TIME_ID INTEGER,CUSTOMER_ID INTEGER,PROMOTION_ID INTEGER,STORE_ID INTEGER,STORE_SALES NUMERIC,STORE_COST NUMERIC,UNIT_SALES DOUBLE);
CREATE TABLE SALES_FACT_DEC_1998(PRODUCT_ID INTEGER,TIME_ID INTEGER,CUSTOMER_ID INTEGER,PROMOTION_ID INTEGER,STORE_ID INTEGER,STORE_SALES NUMERIC,STORE_COST NUMERIC,UNIT_SALES DOUBLE);
CREATE TABLE STORE(STORE_ID INTEGER,STORE_TYPE VARCHAR,REGION_ID INTEGER,STORE_NAME VARCHAR,STORE_NUMBER DOUBLE,STORE_STREET_ADDRESS VARCHAR,STORE_CITY VARCHAR,STORE_STATE VARCHAR,STORE_POSTAL_CODE VARCHAR,STORE_COUNTRY VARCHAR,STORE_MANAGER VARCHAR,STORE_PHONE VARCHAR,STORE_FAX VARCHAR,FIRST_OPENED_DATE TIMESTAMP,LAST_REMODEL_DATE TIMESTAMP,STORE_SQFT DOUBLE,GROCERY_SQFT DOUBLE,FROZEN_SQFT DOUBLE,MEAT_SQFT DOUBLE,COFFEE_BAR BIT,VIDEO_STORE BIT,SALAD_BAR BIT,PREPARED_FOOD BIT,FLORIST BIT);
CREATE TABLE TIME_BY_DAY(TIME_ID INTEGER,THE_DATE TIMESTAMP,THE_DAY VARCHAR,THE_MONTH VARCHAR,THE_YEAR SMALLINT,DAY_OF_MONTH SMALLINT,WEEK_OF_YEAR DOUBLE,MONTH_OF_YEAR SMALLINT,QUARTER VARCHAR,FISCAL_PERIOD VARCHAR);
CREATE TABLE WAREHOUSE(WAREHOUSE_ID INTEGER,WAREHOUSE_CLASS_ID INTEGER,STORES_ID INTEGER,WAREHOUSE_NAME VARCHAR,WA_ADDRESS1 VARCHAR,WA_ADDRESS2 VARCHAR,WA_ADDRESS3 VARCHAR,WA_ADDRESS4 VARCHAR,WAREHOUSE_CITY VARCHAR,WAREHOUSE_STATE_PROVINCE VARCHAR,WAREHOUSE_POSTAL_CODE VARCHAR,WAREHOUSE_COUNTRY VARCHAR,WAREHOUSE_OWNER_NAME VARCHAR,WAREHOUSE_PHONE VARCHAR,WAREHOUSE_FAX VARCHAR);
CREATE TABLE WAREHOUSE_CLASS(WAREHOUSE_CLASS_ID INTEGER,DESCRIPTION VARCHAR);
