Run the script to the right.
In this step you will create a set of base tables that will be used throughout the
rest of the tutorial.
Description of the schema:
The application contains three types of entities: customers, products, orders.
View the diagram
- Each customer has an identification number, name, email and birth date that is stored in the CUSTOMER table.
- The PRODUCT table contains a description of the product along with price per unit and a category.
- The CATEGORY table contains the hierarchical relationship between different categories via parent_id columns.
- The ORDERS table contains an order id, the total sum of the items in the order, and a reference to the customer.
- The ORDER_DETAILS table contains detailed information on individual items in the order.
- The Created Global Temporary Table (CGTT) SHOPPING_CART is used as a shopping cart mechanism.
Note that DB2 9.7 accepts the Oracle native datatypes like NUMBER, VARCHAR2 and TIMESTAMP(N).
You should see several of successful messages in the lower right.