Check sibling questions

(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

Are ads bothering you?

Davneet Singh's photo - Teacher, Engineer, Marketer

Made by

Davneet Singh

Davneet Singh is a graduate from Indian Institute of Technology, Kanpur. He has been teaching from the past 12 years. He provides courses for Maths and Science at Teachoo.