Question: Answer 4. 21 only only, I included 4.20 for reference only. 4.20 (20 points). Show how to define a view tot credits (year, num_credits) using
Answer 4. 21 only only, I included 4.20 for reference only.
4.20 (20 points). Show how to define a view tot credits (year, num_credits) using relations from the University Database (depicted in Figure 1), giving the total number of credits taken in each year. takes ID course id sec ld semester wear grade student ID name depr_name tor_cred section course ld sec_id semester wear building room_number time_slor_id course course id title depr_name credits department dept name building budget advisor sid Uld time_slot time slor id day start time end_time classroom building room_number capacity prereq course id preregid instructor ID name dept_name salary teaches ID course id sec id semester wear Figure 1: Schema diagram for the university database. 4.21 (20 points). For the view of the above exercise 4.20, explain why the database system would not allow a tuple to be inserted into the database through this view. 4.20 (20 points). Show how to define a view tot credits (year, num_credits) using relations from the University Database (depicted in Figure 1), giving the total number of credits taken in each year. takes ID course id sec ld semester wear grade student ID name depr_name tor_cred section course ld sec_id semester wear building room_number time_slor_id course course id title depr_name credits department dept name building budget advisor sid Uld time_slot time slor id day start time end_time classroom building room_number capacity prereq course id preregid instructor ID name dept_name salary teaches ID course id sec id semester wear Figure 1: Schema diagram for the university database. 4.21 (20 points). For the view of the above exercise 4.20, explain why the database system would not allow a tuple to be inserted into the database through this view
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
