0% found this document useful (0 votes)
2 views1 page

SQL Lab Activity

The document outlines a lab activity focused on creating an inventory management database named 'inventory_db'. It includes steps for creating two tables, 'products' and 'suppliers', inserting sample data, performing queries, updating records, and deleting entries. The activity aims to teach basic data manipulation operations within the database context.

Uploaded by

jboyboy001
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

SQL Lab Activity

The document outlines a lab activity focused on creating an inventory management database named 'inventory_db'. It includes steps for creating two tables, 'products' and 'suppliers', inserting sample data, performing queries, updating records, and deleting entries. The activity aims to teach basic data manipulation operations within the database context.

Uploaded by

jboyboy001
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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.

You might also like