A & B Section Question Paper
A & B Section Question Paper
Sahiwal Campus
(Department of Computer Science)
Course Title: Database Systems Course Code: Credit Hours: 4(3,1)
Course Instructor: Zamzam Darwaesh Programme Name: BSSE
Semester: 4th Batch: FA21 Section: A & B Date: 18-05-2023
Time Allowed: 180 Minutes Maximum Marks: 25
Student’s Name: Reg. No. CUI/ /SWL
Important Instructions / Guidelines:
Read the question paper carefully and answer the questions according to their statements.
Mobile phones are not allowed. Calculators must not have any data/equations etc. in their memory.
Midterm Examinations Spring-2023
Q # 1.
Consider the following database schema of the Customer order system, where the primary keys
are underlined.
Customer (customeld, ename, address, balancedue)
Product (productId, description, qtyavailable, price)
Order (orderld, orderdate, customerid)
Order Detail (orderld, productId, quantity)
Write SQL commands to do each of the following (any five): [10 Marks]
Q # 2.
SELECT * FROM Persons
WHERE FirstName LIKE '%mr%';
[05 Marks]
Q # 3.
Page 1 of 2
Temporary Employment Corporation (TEC) places temporary workers in companies during peak
periods. TEC's manager gives you the following description of the business: TEC has a file of
candidates who are willing to work. If the candidate has worked before, that candidate has a specific
job history. Each candidate has several qualifications. TEC also has a list of companies that request
temporaries. Each time a company requests a temporary employee, TEC makes an entry in the
openings folder. This folder contains an opening number, company name, required qualifications,
starting date, anticipated ending date, and hourly pay. Each opening requires only one specific or
main qualification. When a candidate matches the qualification, he/she is given the job, and an entry
is made in the placement record folder. This folder contains an opening number, candidate number,
total hours worked, and so on. In addition, an entry is made in the job history for the candidate.
Read the above description and create tables in SQL accordingly. [10 Marks]
[CLO4-C3/SO4]
The End
Page 2 of 2