(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

Remove Ads
Teachoo · Class 12 Explore Class 12
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.