Database Pet store schema
| Table name: | PRODUCT |
| Primary key: | PRODUCT_ID |
| Columns: |
|
Recursive relationship where one product (a package) is made up of one or more products. If any product is included in a
package, its package ID will contain the product ID of the package. Products not included in a package contain null values in
the PACKAGE_ID column.
| Table name: | CUSTOMER |
| Primary key: | CUST_ID |
| Columns: |
|
Hot spot 4
Relationship: A customer buys zero, one, or many customer sales. A customer sale is purchased by one customer.
| Table name: | CUSTOMER_SALE |
| Primary key: | SALES_ID |
| Columns: |
|
Hot spot 6
Relationship: A customer sale includes zero, one, or many items purchased. A sales item is part of one customer sale.
| Table name: | SALES_ITEM |
| Primary key: | SALES_ID and PRODUCT_ID |
| Columns: | SALE_AMOUNT NUMBER(10, 2) |
Relationship: A product can be a sales item in zero, one, or many customer sales. A sales item is always one product.
Hot spot 9
Relationship: A product that is a pet can have zero, one, or many log entries. A pet care log entry is always related to one
product.
| Table name: | PET_CARE_LOG |
| Primary key: | PRODUCT_ID and LOG_DATETIME |
| Columns: |
|