0% found this document useful (0 votes)
12 views3 pages

Spring 2024 - CS403 - 2

Cs403 assignment

Uploaded by

Makki Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Spring 2024 - CS403 - 2

Cs403 assignment

Uploaded by

Makki Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment No.

02
Total Marks: 20
SEMESTER Spring 24
CS403- Database Management System Due Date: 24-June-2024

Instructions:
Please read the following instructions carefully before solving & submitting the assignment solution:
It should be clear that your assignment will not get any credit (zero marks) if:
o The assignment is submitted after the due date.
o The submitted assignment solution does NOT open or the file is corrupt.
o The assignment is copied (from other students or ditto copy from handouts or the internet).
o Please ensure that your assignment submission is in .doc or .docx format. Other formats such as scanned
images, PDFs, .ZIP, .RAR, .bmp, etc., will not be accepted.

Objectives
The objective of this assignment is:
 To be able to understand the concept of Normalization.
 To be able to understand and write SQL queries / commands.

Deadline:
Your assignment must be uploaded/submitted at or before 24-June-2024.

Scenario

An E-Gadget Store provides electronic gadgets to customers across the country. The system displays available
gadget types such as smartphones, laptops, tablets, and accessories, along with their images, names, prices, number
of units in stock, and related descriptions.
Anyone can view the available gadgets, but only registered customers and wholesalers can interact with the
website. Registered users can purchase gadgets listed on the site, and they can also place customized orders for
gadgets with specific configurations, colors, features, accessories, and quantities. Customers can specify a required
completion date for the customized orders. They can also view and download their invoice.
The store manager can view order details and process the orders, as well as generate invoices. The manager is
responsible for keeping track of available stock.
The manager can allocate customized orders to technicians and view allocated order details. Technicians can view
their allocated order details and update the order status as it progresses through the customization process.
Now consider the following table from the scenario and convert it in 1st Normal Form.

Question # 1 Marks 5

The following relation TECHNICIAN is not in 1st Normal Form, you need to convert it into 1st Normal form.

TECHNICIAN
Tec_ID Tec_Name Tec_Phone Tec_City
1 Ahmed 03001122334 Multan
03021122335
2 Faisal 03000102034 Karachi
3 Nouman 03211234567 Lahore
03013216547
4 Usman 03133214567 Islamabad

Question # 2 Marks 15

You are required to write the SQL commands for each of the following statements in the given table. Write
SQL Commands in the 2nd Column of the following table.

Statement SQL Command


1. Create a table named Technician. You
also have to define a primary key and any
foreign key relationships if applicable.

2. Insert a new record into the "Customers"


table with the following details:
CustomerID = "C001", Name = "John
Doe", Email = "[email protected]",
Phone = "123-456-7890", and Address =
"123 Elm Street, Springfield".

3. Delete all records from the Orders table


where the Order Date is older than January
1, 2020.
4. Update the "Email" of a customer in the
"Customers" table with "CustomerID" =
'C002' to '[email protected]'.

5. Retrieve the "Name" and "Price" of all


gadgets in the "Gadgets" table where the
"Price" is greater than 5000.

For any query about the assignment, contact at [email protected]

Lectures Covered: This assignment covers Lectures # 18 to 30.


Deadline: Your assignment must be uploaded/submitted on or before the due date 24-June-2024.

GOOD LUCK

You might also like