<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<database name="dellstore2" schema="public" type="PostgreSQL - 9.4.4">
   <tables>
      <table name="categories" numRows="16" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('categories_category_seq'::regclass)" digits="0" id="0" name="category" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="1" name="categoryname" nullable="false" remarks="" size="50" type="varchar"/>
         <primaryKey column="category" sequenceNumberInPK="1"/>
         <index name="categories_pkey" unique="true">
            <column ascending="true" name="category"/>
         </index>
      </table>
      <table name="cust_hist" numRows="60350" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="customerid" nullable="false" remarks="" size="10" type="int4">
            <parent column="customerid" foreignKey="fk_cust_hist_customerid" implied="false" onDeleteCascade="true" table="customers"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="orderid" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="2" name="prod_id" nullable="false" remarks="" size="10" type="int4">
            <parent column="prod_id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="inventory"/>
         </column>
         <index name="ix_cust_hist_customerid" unique="false">
            <column ascending="true" name="customerid"/>
         </index>
      </table>
      <table name="customers" numRows="20000" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('customers_customerid_seq'::regclass)" digits="0" id="0" name="customerid" nullable="false" remarks="" size="10" type="serial">
            <child column="customerid" foreignKey="fk_cust_hist_customerid" implied="false" onDeleteCascade="true" table="cust_hist"/>
            <child column="customerid" foreignKey="fk_customerid" implied="false" onDeleteCascade="false" table="orders"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="firstname" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="2" name="lastname" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="3" name="address1" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="4" name="address2" nullable="true" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="5" name="city" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="6" name="state" nullable="true" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="7" name="zip" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="8" name="country" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="9" name="region" nullable="false" remarks="" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="10" name="email" nullable="true" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="11" name="phone" nullable="true" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="12" name="creditcardtype" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="13" name="creditcard" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="14" name="creditcardexpiration" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="15" name="username" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="16" name="password" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="17" name="age" nullable="true" remarks="" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="18" name="income" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="19" name="gender" nullable="true" remarks="" size="1" type="varchar"/>
         <primaryKey column="customerid" sequenceNumberInPK="1"/>
         <index name="customers_pkey" unique="true">
            <column ascending="true" name="customerid"/>
         </index>
         <index name="ix_cust_username" unique="true">
            <column ascending="true" name="username"/>
         </index>
      </table>
      <table name="inventory" numRows="10000" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="prod_id" nullable="false" remarks="" size="10" type="int4">
            <child column="prod_id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="cust_hist"/>
            <child column="prod_id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="orderlines"/>
            <child column="prod_id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="reorder"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="quan_in_stock" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="2" name="sales" nullable="false" remarks="" size="10" type="int4"/>
         <primaryKey column="prod_id" sequenceNumberInPK="1"/>
         <index name="inventory_pkey" unique="true">
            <column ascending="true" name="prod_id"/>
         </index>
      </table>
      <table name="orderlines" numRows="60350" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="orderlineid" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="1" name="orderid" nullable="false" remarks="" size="10" type="int4">
            <parent column="orderid" foreignKey="fk_orderid" implied="false" onDeleteCascade="true" table="orders"/>
         </column>
         <column autoUpdated="false" digits="0" id="2" name="prod_id" nullable="false" remarks="" size="10" type="int4">
            <parent column="prod_id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="inventory"/>
         </column>
         <column autoUpdated="false" digits="0" id="3" name="quantity" nullable="false" remarks="" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="4" name="orderdate" nullable="false" remarks="" size="13" type="date"/>
         <index name="ix_orderlines_orderid" unique="true">
            <column ascending="true" name="orderid"/>
            <column ascending="true" name="orderlineid"/>
         </index>
      </table>
      <table name="orders" numRows="12000" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('orders_orderid_seq'::regclass)" digits="0" id="0" name="orderid" nullable="false" remarks="" size="10" type="serial">
            <child column="orderid" foreignKey="fk_orderid" implied="false" onDeleteCascade="true" table="orderlines"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="orderdate" nullable="false" remarks="" size="13" type="date"/>
         <column autoUpdated="false" digits="0" id="2" name="customerid" nullable="true" remarks="" size="10" type="int4">
            <parent column="customerid" foreignKey="fk_customerid" implied="false" onDeleteCascade="false" table="customers"/>
         </column>
         <column autoUpdated="false" digits="2" id="3" name="netamount" nullable="false" remarks="" size="12" type="numeric"/>
         <column autoUpdated="false" digits="2" id="4" name="tax" nullable="false" remarks="" size="12" type="numeric"/>
         <column autoUpdated="false" digits="2" id="5" name="totalamount" nullable="false" remarks="" size="12" type="numeric"/>
         <primaryKey column="orderid" sequenceNumberInPK="1"/>
         <index name="orders_pkey" unique="true">
            <column ascending="true" name="orderid"/>
         </index>
         <index name="ix_order_custid" unique="false">
            <column ascending="true" name="customerid"/>
         </index>
      </table>
      <table name="products" numRows="10000" remarks="" schema="public" type="TABLE">
         <column autoUpdated="true" defaultValue="nextval('products_prod_id_seq'::regclass)" digits="0" id="0" name="prod_id" nullable="false" remarks="" size="10" type="serial"/>
         <column autoUpdated="false" digits="0" id="1" name="category" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="2" name="title" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="0" id="3" name="actor" nullable="false" remarks="" size="50" type="varchar"/>
         <column autoUpdated="false" digits="2" id="4" name="price" nullable="false" remarks="" size="12" type="numeric"/>
         <column autoUpdated="false" digits="0" id="5" name="special" nullable="true" remarks="" size="5" type="int2"/>
         <column autoUpdated="false" digits="0" id="6" name="common_prod_id" nullable="false" remarks="" size="10" type="int4"/>
         <primaryKey column="prod_id" sequenceNumberInPK="1"/>
         <index name="products_pkey" unique="true">
            <column ascending="true" name="prod_id"/>
         </index>
         <index name="ix_prod_category" unique="false">
            <column ascending="true" name="category"/>
         </index>
         <index name="ix_prod_special" unique="false">
            <column ascending="true" name="special"/>
         </index>
      </table>
      <table name="reorder" numRows="0" remarks="" schema="public" type="TABLE">
         <column autoUpdated="false" digits="0" id="0" name="prod_id" nullable="false" remarks="" size="10" type="int4">
            <parent column="prod_id" foreignKey="Implied Constraint" implied="true" onDeleteCascade="false" table="inventory"/>
         </column>
         <column autoUpdated="false" digits="0" id="1" name="date_low" nullable="false" remarks="" size="13" type="date"/>
         <column autoUpdated="false" digits="0" id="2" name="quan_low" nullable="false" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="3" name="date_reordered" nullable="true" remarks="" size="13" type="date"/>
         <column autoUpdated="false" digits="0" id="4" name="quan_reordered" nullable="true" remarks="" size="10" type="int4"/>
         <column autoUpdated="false" digits="0" id="5" name="date_expected" nullable="true" remarks="" size="13" type="date"/>
      </table>
   </tables>
</database>
