Lab Activity: Creating an Inventory Management Database
Objective: Create a database to manage inventory items and perform basic data manipulation
operations.
Steps:
1. Create a Database: Start by creating a new database for managing inventory.
1. Database filename: inventory_db
2. Create Tables: Create two tables named "products" and "suppliers" to store information about
products and suppliers.
TABLE NAME FIELDS DATA TYPE & PROPERTIES
suppliers supplier_id INTEGER PRIMARY KEY
supplier_name TEXT
contact_name TEXT
contact_number TEXT
email TEXT
products product_id INTEGER PRIMARY KEY
product_name TEXT
quantity INTEGER
price INTEGER
supplier_id INTEGER, FOREIGN KEY
(supplier_id) REFERENCES
suppliers(supplier_id)
3. Insert Data: Insert some sample of at least 5 data into the "products" and 2 data into the
"suppliers" tables.
4. Query Data: Retrieve and display the data from the "products" and "suppliers" tables.
5. Update Data: Update the price of a product.
6. Delete Data: Delete a product record from the "products" table.
7. Query Data Again: Retrieve and display the updated data from the "products" table.