Database System AD/BS 2 Semester/Term University of Sarghoda 2026
Discussion
Ask a question about this paper, or help someone else with theirs. Answers are emailed to whoever asked.
No questions yet — be the first to ask.
Need a paper or stuck on a question? Ask here — students reply and you get an email.
Ask about a paperPaper text
Subject: CS/IT/SE
Time Allowed: 2:30 Hours
University of Sargodha
AD/BS 2ad Semester Examination 7027
Note: Objective Part is compulsory. Attempt any three Ouestions from shieetive part.
Paper: Database Systems (CMPC-5203)
Maximum Marks: 40
Q.1.
Objective Part (Compulsory)
Write short answers of the following in 2-3 lines each on your answar sheet.
五i.
ii
.٧
vi.
What is a NoSOL database, and how does it differ from a relational database?
What is the purpose of a "lock" in concurrency control?
What is a projection in relational databases?
(2*8)
vii.
viii.
What is an index in a database, and why is it used?
How does the Cartesian Product operation work in relational algebra?
Q.2.
What is the union operation in relational algebra? Provide an example.
In relational databases, what is the purpose of foreign keys
Q.3.
Q.4.
Define backup and recovery in the context ofdatabase systems and explain why they are essential Describe different types o
systems that led to the development of database systems.
Compare and contrast File-Based Systems and Database Management Systems (DBMS). Explain the limitations of file-based
What is referential integrity in the context of relational databases
Subjective Part (3*8)
backups Explain recovery techniques Disarantiata kareen avera ask sana and cansaction failure recovers
backups Explain recover techniques Differentiate between svetam crash recoverv and teansaction failure recover
Design an Entity-Relationship Diagram (ERD) for a Hospital Management System based on the following scenario.
• Each doctor has a unique DoctoriD, Name, Specialization, and Phone Number.
A hospital needs to maintain information about doctors, patients and the appointments scheduled between them.
• Bach patient has a unique PatiantID Nama Gandar natanmist sa pLasaNke
• A doctor can have many appointments with different patients and a patient ean have annointments with multiple doctors.
eASor can Ла maY ePointments with different natients anaa satant can have annointments with munple doctors
• The hospital also stores prescriptions associated with each annointment, A prescrintion includes MedicineName, Dosage, anc
• Each appointment has a unique AppointmentID, the Date, the Time, and the RoomNumber.
• The nOSPItal alSo Stores prescriptions associated with each appointment, A prescription includes MedicineName, Dosage, anc
1) Identify the entities in the system
2) Define relationships between the entities
3) Define the cardinality of each relationship
Q.5.
5) Draw an ERD to represent the system. Make sure to include primary keys, foreien keys, and the relationships between the
4) Identify attributes for each entity and relationship.
StudentID
StudentName
101
CourselD
CourseName
InstructorID
InstructorName
InstructorPhone
Credits
Alice
555-1234
З
102
CS101
Data Science
101
John Smith
Bob
555-5678
4
03
CS102
AI
102
Jane Doe
Charlie
CS101
04
Data Science
101
John Smith
555-1234
Alice
CS103
Database
1103
Mike Brown
[555-9876
Convert this table into First Normal Form (INF), if it's not already in INF.
Convert the table into Second Normal Form (2NF).
Convert the table into Third Normal Form (3NF).
Provide the final schema after the normalization process to 3NF.
Q.6.
Customer Table
CustomerID
CustomerName
Alice
Bob
Charlie
Diana
4
Order Table
OrderID
101
102
103
CustomerID
12
OrderDate
2024-01-10
2024-02-15
/2024-03-12
2024-04-01
City
New York
Los Angeles
Chicago
Miami
TotalAmount
250.00
180.00
300.00
| 120.00
04
Product table
ProductName
ProductID
POI
Laptop
Mouse
P02
РОЗ
Keyboard
a. Write an SQL query to Display the customer name, order ID, and total amount for all orders placed.
b. Write an SQL query to Find the total quantity of each product sold.
c. Write an SQL query to List all products that have never been ordered.
d. Write an SQL query to List the customers from "New York" who have ordered a "Laptop".
-LK-9285/13-11-2026-(F-25)-
Price
1000
20
50