Consider the E-R diagram for the university database as given below (in figure 1
ID: 3822907 • Letter: C
Question
Consider the E-R diagram for the university database as given below (in figure 1). Answer the following questions:
1. What does the double-lined diamond shape around the relationship set sec_course indicate?
2. Translate the lower part of the University E-R diagram, (which is also shown below in figure 2 ) into a relational database (i.e., translate this part of the E-R diagram into relational schemas.)
(Figure 1)
(Figure 2 below)
course dept inst dept instructor name salary teaches course course id Sec Course title credits prereq prereq id course id department dept name building budget stud dept student ID advisor name tot cred takes grade section time slot sec id. semester sec time slot time slot id day start time end time sec class classroom build in room number capacityExplanation / Answer
1.Ans:- The double-lined diamond shape around the relationship set sec_course is a representation of a weak relationship type.
- It can also be represented by a bold diamond shape.
- And a Weak entity set is represented by double rectangles or a bold rectangle.
2.Ans:- E-R diagram into relational schemas:
- Here Section is a weak entity.
- course, time_slot and classroom are strong entity-sets.
a) Schemas for strong entity-sets:
course(course_id,title,credits)
time_slot(time_slot_id,day,start_time,end_time)
classroom(building,room_number,capacity)
b) Schema for Section weak entity-set:
- Weak entity section is converted into a table with primary keys of strong entities which are acting as a foreign key in the table.
- Here discrimators are: sec_id, semester and year.
therefore,
Section(course_id,time_slot_id,building,room_number,sec_id,semester,year)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.