Database System BS 4 Semester/Term UOS — University of Sargodha 2024
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
University of Sargodha
BS 4' Term Examination 2024
Subject: Computer Science
Paper: Database Svstems (CMPC-202)
Maximum Marks: 40
Time Allowed: 02:30 Hours
Note: Objeetive part is compulsory. Attempt any three questions from subjective part.
Objective Part
(Compulsory)
(2°8)
Q.1. Write short answers of the following in 2-3 lines of each on your answer sheet.
What is Data Warchouse?
ii.
ili.
iv.
V.
vi.
vii.
vili.
What is database management system?
What is data independence?
What is composite identifier?
What is degree of relationship?
Write down the limitations of hierarchical and notwork model?
Explain the Multivalued Attribute.
What is data dictionary?
Q.2.
Q.3.
Q.4.
Q.5.
Q.6.
Subjective Part
(3°8)
Explain the functions of each of the following SQL keywords using sample SQL querics (or a single
SQL query if you prefer).
a) COUNT
b) GROUP BY
c) HAVING
d) INNER JOIN
e) IN
1) LIKE
Explain Degree and Cardinality of Relationships with example.
Convert the following table into 3rd normal form:
Patient ID
Name
Address
Visit Date
p-100809
Ali
32-M Model
12-02-2007
Town Lahore
20-02-2007
29-02-2007
15-03-2007
p-200145
Naila
9-Jail Road
Lahore
10-01-2007
15-02-2007
25-03-2007
Physician
Dr. Zahid
Dr. Farooq
Dr. Rchan
Dr. Liaqnt
Dr.Linqat
Dr.Khushi
Dr.A yesha
Diagnosis
Chest infection
Cold
Hepatitis-A
Eyes infection
Bone Fracture
Cough
Flu
Treatment
Free
Free
Paid
Free
Paid
Free
Free
Draw BE-R model of the following:
A person may be employed by one or more organizations, and cach organization may be the employer of
one or more persons. An organization can be an internal organizational unit or an external organization.
For persons and organizations, we want to know their ID, name, address, and phone number. For persons,
we want to know their birth date, and for organizations, we want to know their budget number. For cach
employment, we want to know the employment date, termination date, and bonus. Employment of a
person by an organization may result in the person holding many positions over time. For each position.
we want to know its title, and each time someone holds that position, we need to know the start date and
termination date and salary. An organization is responsible for each position. It is possible for a person to
be employed by one organization and hold a position for which another organization is responsible.
Write SQL commands for each of the following queries:
Relations:
a) Classes (class, type, country, numGuns, borc, displacement)
b) Ships (name, class, launched)
c) Battles (name, date)
d) Outcomes (stip, battic, result)
Queries:
a) Find the number of battleship classes.
b) Find the average number of guns of battleship classes.
c) Find the average of guns of battleships. Note the difference between
(b) and
(c);
do we weight a class by the number of ships of that class or not?
d) Find for cach class the year in which the first ship of that class was launched.
c) Find for each class the number of ships of that class sunk in battle.
.. LK-5434/27-11-24