Assignment 2 22102024 095017am

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Database Management Systems

BSCS-4

Department of Computer Science


Bahria University, Lahore Campus

Assignment: [2]
Date: Week 6, 29 October, 2024
Name: _____________________
Roll No: ___________________
Evaluation of CLO Question Marks Obtained
Number Marks

CLO 2: Apply different database model to design conceptual,


logical or physical database.

Total Marks 20

Question 1
Illustrate an ER diagram of a library management system of your university by asking and
observing the operations in the library from the librarian. You are required to:

1. Identify the main entity types of the library.


2. Categorize the main relationship types (unary, binary, ternary) between the entity types
described in part (1)
3. Determine the multiplicity constraints for each relationship described in part (2). Illustrate
the multiplicity for each relationship in the ER diagrams created in part (2).
4. Recognize attributes (single-valued, multi-valued, derived and composite) and associate them
with entity or relationship types. Represent each attribute in the ER diagrams created in part
(3).
5. Determine foreign and primary key attributes for each (strong) entity type.
6. Identify weak entities if any.

Question 2
Analyze the following given ER diagram of hospital management system and suggest its schema
diagram.
Question 3
Professors have a PROFID, a name, an age, a rank, and a research specialty.
Projects have a project number, a sponsor name (e.g. UGC/AICTE/...), and a budget.
Graduate students have an ID, a name, an age, and a degree program (e.g. MCA/ MPhil/BE/ME).
Each project is managed exactly by one professor (known as the project's principal investigator).
Each project is worked on by one or more professors (known as the project's co-investigators).
Professors can manage/work on multiple projects. Each project is worked on by one or more
graduate students (known as the project's research assistants). Graduate students can work on
multiple projects. Each professor can supervise many students. A student who is working on a
project can be supervised by only one professor. Draw an ERD of the above scenario.

Question 4
UPS prides itself on having up-to-date information on the processing and current location of each
shipped item. To do this, UPS relies on a company-wide information system. Shipped items are
the heart of the UPS product tracking information system. Shipped items can be characterized by
item number (unique), weight, dimensions, insurance amount, destination, and final delivery
date. Shipped items are received into the UPS system at a single retail center. Retail centers are
characterized by their type, uniqueID, and address. Shipped items make their way to their
destination via one or more standard UPS transportation events (i.e., flights, truck deliveries).
These transportation events are characterized by a unique scheduleNumber, a type (e.g, flight,
truck), and a deliveryRoute. Please create an Entity Relationship diagram that captures this
information about the UPS system. Be certain to indicate identifiers and cardinality constraints.
Question 5
CREATING A RELATIONAL DATABASE SCHEMA.

Address DoctorID
Name
Name

PatientID
PATIENT DOCTOR

Patient
Result Date
Treatment

TreatmentID TREATMENT Details

Read the above ERD carefully and answer the following questions
a. Please convert the ER diagram into a relational database schema. Be certain to indicate
primary keys and referential integrity constraints.
b. Please identify an attribute in the above ER diagram that might represent a composite
attribute, and explain why/how it might represent a composite attribute.
c. The ER diagram/relational database schema contains several instances of data redundancy.
Please identify one instance where a data redundancy issue exists.
d. What is the degree of relationship between DOCTOR and TREATMENT?
e. According to the figure, is it required for all Treatment to be owned by an Doctor?

You might also like