You are on page 1of 5

Data Diagram

Data Dictionary

a). Products Table

Column Name Data Type Description

id INTEGER Primary key for the products table


Column Name Data Type Description

name TEXT The name of the product

description TEXT A description of the product

quantity INTEGER The quantity of the product in stock

price DECIMAL The price of the product

b). suppliers table

Column Name Data Type Description

id INTEGER Primary key for the suppliers table

name TEXT The name of the supplier

email TEXT The email address of the supplier

phone_number TEXT The phone number of the supplier

c.) Orders table

Column
Name Data Type Description

id INTEGER Primary key for the orders table

order_date DATE The date the order was placed

total_cost DECIMAL The total cost of the order

Foreign key that references the supplier that the


supplier_id INTEGER order was placed with

d). order details

Column
Name Data Type Description

Foreign key that references the order that this row


order_id INTEGER belongs to

Foreign key that references the product that was


product_id INTEGER ordered

quantity INTEGER The quantity of the product ordered

cost DECIMAL The cost of the product for this order


Column
Name Data Type Description

Fig. 1 The data base

Fig.2 Details of table called orders.


Fig.3 products

Fig.4 suppliers table

Fig.5. orders
Fig.6 products

You might also like