0% found this document useful (0 votes)
77 views6 pages

DBS Practice

The document discusses a midterm exam for a database systems course. It contains four questions - the first asks to design an EER diagram for HR management, the second gives the logical model for a publishing conceptual model, the third asks to normalize an unnormalized data table to 3NF, and the fourth provides short notes.

Uploaded by

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

DBS Practice

The document discusses a midterm exam for a database systems course. It contains four questions - the first asks to design an EER diagram for HR management, the second gives the logical model for a publishing conceptual model, the third asks to normalize an unnormalized data table to 3NF, and the fourth provides short notes.

Uploaded by

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

Quaid-i-Azam University

CS-225 Database Systemns Department of Computer Sciences


Midterm Time 2 hrs Date 25-05-2023 Marks 30
Q.1. Design the EERD for the
given scenario. Quttine any
AHuman Resource
Management
company is divided into a number of departments,
assumptions
Denartmentandwishes to create
employee
ir requea
a database
are assigned to toonemonitor
department.
its em The department
has a designated Manager
who has overall department
However, to help manage the department.Iresponsibility
a lor the department andtheemployees in the
When a new number of emplovces are nominated to superve
employee joins the company, information on previous work history and qualifications is Eouynd
required Ona
regular basis, each employee is required to undereo a review, whichis but ma
be delegated to a nominated r normally carried out by e such asa
Manager, Business representative. The company has defined a number of position types,
for most non-seniorAnalyst, Salesperson, Secretary, and each type has a number of grades associ
ciated with it, which
positions Posts are
allocated to a department determines the employee's salary. At a senior level, salary is negotiable,
Business Analyst posts. Aoepending on itsbyworkload.
post will be filled For example, adepartment may be allocated two new
one emplovee, although over time,
different posts. wi employees
Q.2. Give the logical relational data model for the following
conceptual data model of a publishing Scee
PnntlobType

plkoblypeNo

Typetor

1..
IPublishet Ilaces Iindot PurchawOrder
kequires
publisBherNo 1..1 1.1
printlobNo purchaseOrderNo

Detals
SAllocated
Manages
.

EmnpPrintJob WorkOn Enployee POlten

0.. 1..1 CmployeeNo


1.

Uses

Item

item No

Q.3. Give the 3NF normalized relational database schema for the given un-normalized data, along with al.
intermediate steps.
S
Sid s_Name S-Per_Address \SS-T-Apt Hostel
s-T-Bldng
4
S-T-Area ST_City sub_ jd Subject_opted
Sat Town
401 Ali Kotri Rawalpindi S_I Bio
402 Adil Lalhore Hostel 4 QAU Islamabad S_2 Maths
403 Shalhid Haripur 6 Hostel 3 QAU Islamabad s_2 Maths
404 Ali Kotri 5 Hostel S QAU Islamabad S_3 Physics
Q.4. Short Notes Bx412)
a) Outline your assignment project's mission objectives and user roles.
b) Fact Finding Technique -Research
c) Relational Data Model
d) Chasm Trap
Quaid-i-Azam University
Department of Computer Sciences
CS-235 Database St stems Terminal Marks S0 Time 3 hours Date 15-06-2023

Name: Regn. #

Q.1 (2 x6)-4 16
a) Short Notes
a) External User Views of a Database System
b) Difference between Logical and Phy sical Data Independence
c) Database System Development Life Cycle
d) Chasm Trap in Entity Relationship Diagram
e) Division operator of Relational Algebra
) View Concept in SQL
b)Fragmentation in Distributed Database System
Q.2 Consider Figure A for answering Q.2.a. and Q.2.b. (4+4) -8
a) Give the detail data requirements of the system whose conceptual design (ERD) is given in the Figure A. For
atributes of entities and relationships. make suitable assumptions. The detail should be given clearly and in formal
manner.
b) Give the Logical Relational Model for the Conceptual Design given in Figure A.

Dale
Tme stamo
SHIP MOVEMENT Time
Longtude
1:N
ttde

HISTORY

1:1 Tpe (Tonnage) Hul


Srame 0:N 1:1
SHIP TYPE SHIP_TYPE
0:N
Start cate End date
0:N

SHIP AT {1.1)
HOME_PORT PORT 1:1
e0T MST (Contnen
Name
1:1 0:N
0:N 1:1
IN 4STATEICOUNTRY
Pname )H PORT
0:N
Namg
1:1
SENOCEANALAKE
Figure A
Q.3. Identify the functional dependencies in the given unnomalized data. Convert the unnormalized data table into
3NF (Normalization). Also give the INF and 2NF intermediate forms of the unnormalized data table. (6)
Teor cditor de no dy nanedesadrauttor_sd author_nae auhor ad dr
4216 wooll deslgn arguslar $3 ianic 5-tor
4216 WOoll deslgn argusl 44 bolton Imaluev
4216 19 deslgn aTyusl 71 laenig malh
27 a1alysis arguz 26 folkstone
3789 27 analyss tgus2
27 analysis tgus2

l/2
Q.4Create the Enhanced Entity Relationship Diagram from the given data reauirements for the system. (5)
The management of a large retail store would like a datahase to keen track of sales activities. The reu
analysis for this database led to the six entities and their unigue identifiers shown in Figure B. Tne
assertions describe the data relationships:
Each customer has one job title, but different Customers may have the same job
thtie.
Each customer may place many orders, but only one customer may place a paticular
Each department has many sales people, but each sales person must work in only one department.
Each department has many items for sale, but each item is sold in only one department. ("Item" means item
type, like IBM PC).
For each order, items ordered in different involve different sales people. but all itemsorder.
departments must salesperson. In other words. for each
ordered within one department must be handled by exactly one
each item has exactly one salesperson; and for each order.each department has exactly one saiey
Number of
Entity key Key occurrences
Entity in characters lengthtmax)
Customer Cust-no 6 80,000

Job jcb-no
order-no 200,0
Figure B Order
Salesperson salesid 20 150

Departnent 2 10
depa-no
Item item-no 6 5,000

SQL syntax for the given queries based on set of relations g


Q.5 Give the Relational Algebra and the (1.5-2.5) x3 = (12)
Figure C. Only give the resu<tant query.
priced over 100?
a) Which customers have not ordered any item
006?
b) Which items are ordered by both customers 005 and
ordered more than once.
c) Display item number and total count, for items
Customer (cust num, cust name, address, credit_ level)
Item (item num, item_name. price. weight)
Order (ord mum, cust_num. item_num. quantity. total_cost)
Quaid-i-Azam University
Department of Computer Sciences
CS 225 Database Systems Midterm Marks :30 Date 19-05-2022

Q.1. Short Notes (Example where required) 3 x7=21


a) Relational Model b) MySQL DBMS Data types c) MS ACcess Relationship Diagram
d) Multi-valued Attribute, Composite Attribute, Derived Attribute e) 3rd Normal Form
f) Multilevel Index g) Transaction Usage Map
Q.2. Create the conceptual design for the given data requirements, using EERD using Canolly (Book) Notation. 5
Each office has a Manager (who tends to also be a Senior Instructor), several Senior Instructors,
Instructors, and
administrative staff. The Manager is responsible for the day-to-day running of the office. Clients must first register at an
office, which includes completion of an application form, which records their personal details. Before the first lesson, a
client is requested to attend an interview with an Instructor to assess the needs of the client and to ensure that the
client holds a valid provisional driving license. A client is free to ask for a particular Instructor or to request that an
Instructor be changed at any stage throughout the process of learning to drive. After the interview, the first lesson is
booked. Alient may request individual lessons or book a block of lessons for a reduced fee. An individual lesson is for
one hour, which begins and ends at the office. Alesson is with a particular Instructor in a particular car at a given time.
Lessons can start as early as 8:00 a.m. and as late as 8:00 p.m. After each lesson, the Instructor records the progress
made by the client and notes the mileage used during the lesson. The school has apool of cars, which are adapted for
the purposes of teaching. Each Instructor is allocated to a particular car. As well as teaching, the Instructors are free to
use the cars for personal use. The cars are inspected at regular intervals for faults. Once ready, a client applies for a
driving test date. To obtain afull driving license, the client must pass both the driving and written parts of the test. It is
the responsibility of the Instructor to ensure that the client is best prepared for all aspects of the test. The instructor is
not responsible for testing the client and is not in the car during the test, but should be available to drop off and pick up
the client before and after the test at the Testing Center. If aclient fails to pass, the instructor must record the reasons
for the failure.

Q.3. How Enhanced Entity Relationship diagram specialization/generalization classification is converted to relational
logical model? Explain with the help of an example.
Database System Quiz 5 Marks 08-05-2023

Create ERD for the given data requirements for afight booking database design scenario:
The airline has one or more airplanes.
An airplane has a model number, a unique registration number, and the capacity to take
one or more passengers.
An airplane flight has aunique flight number, adeparture airport, adestination airport, a
departure date and time, and an arrival date and time.
Each flight is carried out by a single airplane.
Apassenger has given names, a surname, and a unique email address.
A passenger can book a seat on a flight.

ModelNumber GivenNames

RegistrationNumber Airplane Passenger Surname

apacity EmailAddres
Books

FlightNumber Flies N

From Booking

Flight HasBooking
DepartureDate

DepartureTime

(ArrivalDate

(ArrivalTime

Convert to Book Notation for practice! In Sessional, Mid, Terminal: Only book notation acceptable!
Quad4-Azam University
Department of Computer Sdences Date 07-07-2021
cS 225 Database Systems Terminal Time 3 hours

Marks:40 (Written) 10 Oral Viva


"No extra time. Written flve questions Must submit al rough work done for solvng questions. Each question
answer should be ubmitted as a single zip file (containing al details)
Q.1. Create the EERD for the given data requirements (8) 30 minutes

Aconsultancycompany wishes to create a database to help manage its projects. Each project is for a speafic dient
and has anominated project manager. The project is divded into anumber of work packages and employees bill
their time and expenses againt awork package. Each employee has aspecific role, which defines the charging rate
for the client. Over time, an employee can wort on several work packages associated with the same pro,ect. In
addition, most, but not al, work packages have anumber of associated documentsas delverabies, each of which
may be written by more than one enpioyee. Take any assumptios you deem appopriate.

You might also like