DB Final Exam Summer 20201 PDF
DB Final Exam Summer 20201 PDF
NOTE: Understanding the paper is part of solving the paper so no questions will be
entertained.
INSTUCTIONS:
1. Write your names and IDs at top of each paper.
2. Write queries on MS Word. No tool required.
3. Convert word to pdf after uploading.
Q1: Perform Normalization upto 3rd Normal Form on the following table.
(13marks)
Student_id Student Student Course_ID Course_Name Grade
Name Address
01 Fawad Karachi SE-01 AI A
SE-05 SQE B
02 Waleed Lahore SE-02 DIP C
03 Saira Peshawar SE-03 DB A
SE-04 SRE B
04 Aiman Karachi SE-03 DB C
05 Daniyal Lahore SE-01 AI A
06 Emaan Peshawar SE-01 AI B
Order_Details
Order_Id Product_ID Unit Price Quantity
01 02 160 Rs 1
01 06 350 Rs 1
02 01 80 Rs 2
02 03 30 Rs 2
02 05 5 Rs 2
1. Write SQL Query for finding/displaying product names and ids of products
whose unit price is less than 50 Rs. (4 Marks)
2. Write SQL Query for displaying sorted names of product names with Alias
name as Product_List_Sorted. (5 Marks)
3. Delete data from Order_Details whose quantity is less than 1. (4 marks)
4. Write SQL INNER JOIN query and its output on the given two tables. (5
marks)
**********************************Good Luck*********************************