0% found this document useful (0 votes)
16 views2 pages

Ict Lab 11

The document outlines a series of student lab tasks focused on understanding and working with relational databases. It includes tasks for designing a database schema, creating SQL tables, performing CRUD operations, distinguishing between raw data and meaningful information, and answering case study questions related to a sample company. Each task has specific objectives and instructions to guide students in learning database concepts and SQL commands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Ict Lab 11

The document outlines a series of student lab tasks focused on understanding and working with relational databases. It includes tasks for designing a database schema, creating SQL tables, performing CRUD operations, distinguishing between raw data and meaningful information, and answering case study questions related to a sample company. Each task has specific objectives and instructions to guide students in learning database concepts and SQL commands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

🎓 Student Lab Tasks: Introduction to Databases

✅ Task 1: Design a Simple Relational Database


Objective: Understand table structure, primary and foreign keys.

Instructions:

1. Create the schema for two tables: Customers and Orders.


2. Define the appropriate fields for each table.
3. Identify and mark primary keys and foreign keys.

Deliverable:
Draw the table structures using a tool (like drawSQL, hand-drawn, or Word/Excel) showing
relationships.

✅ Task 2: SQL Table Creation


Objective: Learn SQL commands to create tables.

Instructions: Using any SQL online compiler (like sqlfiddle.com or db-fiddle.com), write SQL
code to:

 Create the Customers table with these fields:


 CustomerID INT PRIMARY KEY,
 FirstName VARCHAR(50),
 LastName VARCHAR(50),
 Email VARCHAR(100)
 Create the Orders table with:
 OrderID INT PRIMARY KEY,
 CustomerID INT,
 OrderDate DATE,
 Amount DECIMAL(10, 2),
 FOREIGN KEY (CustomerID) REFERENCES Customers(CustomerID)

✅ Task 3: Perform CRUD Operations


Objective: Apply basic SQL operations to manipulate data.

Instructions:

1. Insert at least 3 records into the Customers table.


2. Insert corresponding orders into the Orders table.
3. Select all customers and their orders.
4. Update a customer’s email.
5. Delete one of the customer records.

Sample query to get you started:

SELECT Customers.FirstName, Customers.LastName, Orders.OrderDate,


Orders.Amount
FROM Customers
JOIN Orders ON Customers.CustomerID = Orders.CustomerID;

✅ Task 4: Identify Data vs. Information


Objective: Develop an understanding of raw data vs. meaningful information.

Instructions: Given the data in your tables:

 Write a short paragraph explaining what is raw data and what is useful information you
can get from it.
 Example: "The list of all orders is raw data, but calculating total orders per customer is
meaningful information."

✅ Task 5: Case Study Questions


Objective: Apply database thinking to real-world scenarios.

Instructions: Based on the "Simple Order Company" example:

1. What kind of reports would the company need from this database?
(e.g., list of all customers who ordered more than $500 worth of items)
2. Write a SQL query to:
o Find customers who have not placed any orders.
o Find the total sales per customer.

You might also like