(a) Identify the candidate key(s) from the table MOVIE DETAILS. 

Answer

MOVIEID and TITLE 

Explanation:

  Candidate Key is a super key with no repeated attributes .  A table can have multiple candidate keys but only a single primary key

MOVIEID and TITLE for each movie(row) are unique and not repeated.

(b) Consider the table SCHEDULE given below: Table: SCHEDULE 

SLOTID 

MOVIEID 

TIMESLOT 

S001 

M010 

10 AM to 12 PM 

S002 

M020 

2 PM to 5 PM 

S003 

M010 

6 PM to 8 PM 

S004 

M011 

9 PM to 11 PM 

 

Which field will be considered as the foreign key if the tables MOVIE DETAILS and SCHEDULE are related in a database?

Answer

MOVIEID

 

Slide31.JPG

Slide32.JPG
Slide33.JPG
Slide34.JPG

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo