Description of the illustration customer-orders-schema
This figure shows the relational tables in schema CO and the columns in each table, as well as dependencies between the tables.
The table products has the following attributes:
- Columns:
product_id(primary key),product_name,unit_price,product_details,product_image,image_mime_type,image_charset,image_filename,image_last_updated. - Relationships:
- Column
product_idrelates each row of the tableproductsto none or more rows ofproduct_idin theorder_itemstable.
- Column
The customers table has the following attributes:
- Columns:
customer_id(primary key),email_address,full_name - Relationships:
- Column
customer_idrelates each row of the tablecustomersto none or more rows ofcustomer_idin theorderstable.
- Column
The order_items table has the following attributes:
- Columns:
order_idandline_item_id(a composite primary key),product_id,unit_price,quantity. The table also has a composite unique key onorder_idandproduct_id. - Relationships:
- Column
product_idrelates each row of the tableorder_itemsto exactly one value ofproduct_idin theproductstable. - Each
order_itemsrecord is associated with a record inorderstable through theorder_id.
- Column
The orders table has the following attributes:
- Columns:
order_id(primary key),order_datetime,customer_id,order_status,store_id. - Relationships:
- Column
order_idrelates each row of the tableordersto none or more rows oforder_idin theorder_itemstable. - Column
customer_idrelates none or more rows of the tableordersto the corresponding values in thecustomer_idcolumn of the tablecustomers. - Column
store_idrelates none or more rows of the tableordersto the corresponding values in thestore_idcolumn of the tablestores.
- Column
The stores table has the following attributes:
- Columns:
store_id(primary key),store_name,web_address,physical_address,latitude,longitude,logo,logo_mime_type,logo_charset,logo_filename,logo_last_updated. - Relationships:
- Column
store_idrelates each row of the tablestoresto none or more rows ofstore_idin thecustomerstable.
- Column