Question 10 of 12intermediate🔧 ApplyCase Study6 marks

In a multiplex, movies are screened in different auditoriums. One movie can be shown in more than one auditorium. In order to maintain the record of movies, the multiplex maintains a relational database consisting of two relations viz. MOVIE and AUDI respectively as shown below:

Movie(Movie_ID, MovieName, ReleaseDate) Audi(AudiNo, Movie_ID, Seats, ScreenType, TicketPrice)

(a)

Is it correct to assign Movie_ID as the primary key in the MOVIE relation? If no, then suggest an appropriate primary key.

Answer

Yes, it is correct to assign Movie_ID as the primary key in the MOVIE relation. Movie_ID uniquely identifies each movie record in the relation. Since each movie has a distinct identifier, Movie_ID satisfies the conditions of a primary key by being unique and not null.

(b)

Is it correct to assign AudiNo as the primary key in the AUDI relation? If no, then suggest appropriate primary key.

Answer

Yes, it is correct to assign AudiNo as the primary key in the AUDI relation. AudiNo uniquely identifies each auditorium in the multiplex. Each auditorium has a unique number, making AudiNo an appropriate primary key as it uniquely identifies each record in the AUDI relation.

(c)

Is there any foreign key in any of these relations?

Answer

Yes, there is a foreign key in the AUDI relation. The attribute Movie_ID in the AUDI relation is a foreign key that references the Movie_ID attribute (primary key) in the MOVIE relation. This linking attribute establishes the relationship between movies and auditoriums, allowing the database to track which movie is being screened in which auditorium. As stated in the context, linking attributes associate relations with each other and help keep the database in correct state.

Explanation

This question tests understanding of primary keys and foreign keys in relational databases. The Movie_ID in MOVIE relation uniquely identifies each movie, making it suitable as primary key. Similarly, AudiNo uniquely identifies each auditorium. The Movie_ID in AUDI relation acts as a foreign key referencing the MOVIE relation, establishing the one-to-many relationship (one movie can be shown in multiple auditoriums).