(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