You are on page 1of 3

The Institute of Finance Management

FCIM
CSU_07203 Fundamentals of DBs

BSC/BIT [1]/ 2019/2020; ERDs; Review Qns-Set 1 (Due 07-17/07/2020)


Q1.Draw an ER diagram for the following application of a database.
 A movie has a name and release date.
 A studio has a numeric id, name, and address
 A director has a SSN and a name
 An actor has a SSN and a name
 A character in a movie has a name and a role.
 Each movie is produced by a single studio.
 Each movie is directed by a single director.
 An actor plays a character in a movie
Q2.Create an ER diagram for the following situation (fields named id are identifiers; HINT:
Recursive relationship(s) are involved):
 We want to model curriculum information.
 We want to keep track of programs, for which we have its id, and abbreviation, and
a title.
 We also keep track of courses; for each course we keep its id, a title, the number of
credit hours, zero or more course objectives.
 Each course belongs to zero or more programs and a program will have one or more
courses; for each of the programs a course belongs to, we record whether the course
is required or elective for the program.
 We keep track of topics; for each topic we keep its id and title.
 We keep track of which course(s) cover which topic(s). Each topic is covered in one
or more courses, and each course covers zero or more topics. We also keep track of
how many contact hours the course includes for that topic.
 We also need to store information about professors. For each professor we keep its
SSN (identifier) and name (divided into first, middle, last). We also keep track of
which professor teaches which course. Each course is taught by one or more
professors, and a professor teaches zero or more courses.
 We also keep track of whether a course has other courses as prerequisites. Each
course could have zero or more other courses as prerequisites and be a prerequisite
for zero or more courses.

Page 1 of 3
Q3.Consider the following information about a university database
 Professors have SSN, a name, Date of birth(DoB), a rank, address, and a research
speciality
 Projects have a project number, a sponsor name(e.g. COSTECH, NSSF, PSPF etc),
a starting date, an ending date and a budget
 Graduate students have GSSN, a name, date of birth, and a degree program (M.S or
Ph.D.).
 Each project is managed 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 and or work on multiple projects
 Each project is worked on by one or more graduate students ( known as the
project’s research assistants)
 When graduate students work on a project, a professor must supervise their work on
the project. Graduate students can work on multiple projects, in which case they
will have a (potentially different) supervisor for each one
 Departments have a department number (DNumber), a department name, and a
main office.
 Departments have a professor( known as the chairman) who runs the department
 Professors work in one or more departments, and for each department that they
work in, a time percentage is associated with their job
 Graduate students have one major department in which they are working on their
degree
 Each graduate students has another , more senior graduate student ( known as a
student advisor) who advises him or her on what courses to take

Design and draw an ER diagram that captures the information about the university
database. Your diagram should indicate the keys of all entities, as well as the cardinality
and participation constraints of all relationships.

Q4. Create an E-R diagram for the following situation. Your diagram should indicate the keys
of all entities, as well as the cardinality and participation constraints of all relationships.

We want to model a blog system like Confunsed.blogspot.com, where there are many users
which can have different blogs; we want to model Users, their Blogs, the Postings on each
blog, and the Comments for each posting.

 For each user, we keep its username (identifier), password and Name, divided into
FirstName, middle, LastName. For each blog, we keep its id (identifier), title, the date it was
created, and the number of posts (which can be calculated); we also keep track of which user
created which blog; a blog is created by exactly one user, and a user can create one or more
blogs.

Page 2 of 3
 For each Posting, we keep its id (identifier), the blog it belongs to (postings belong to exactly
one blog, and blogs may have zero or more postings), its time stamp and its contents.

 For each Comment, we keep its number (which uniquely identifies comments for the same
posting, but not all comments in general), time stamp and contents. We also keep track the
user who made the comment (comments are made by exactly one user, and a user can make
zero or more comments), and the posting the comment refers to (comments refer to exactly
one posting, and postings can have zero or more comments).

 We also want to keep track of which blogs refer to which other blogs; a blog references to
zero or more blogs and is referenced by zero or more blogs.

Q5. Draw an ER Diagram for the Grade Report for a student below. Assume that each module
is taught by one instructor from the appropriate department but instructor can teach on
one or more modules. Each department offers several modules and each student must be
registered to a specific department and course. Also assume that the Grade Report
database will include many entities and each one must be unique from other entities using
its identifier.
The Institute of Finance Management
GRADE REPORT
Semester 2 2019/2020
Name: Crow Foot SID: 12345678 Course: BCS
Department: Computer Science
& Maths
Campus Main Campus .
Address: 45 Samora Avenue.
Major: Comp. Sc & Maths

ModID Title Instructor Name InstrLocation Dept Grade


CSU07204 Fund. to Data Com Dr. E.K H020 CSM A
CSU07202 Programming in C 2 Dr. M.M A606 CSM B+
ITU07203 SAD2 Dr.R.T A506 IT A
CSU07205 OS Dr. J.R R508 CSM B+

Page 3 of 3

You might also like