Skip to content
Exercises · Q11

Q.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.
(b) Is it correct to assign AudiNo as the primary key in the AUDI relation? If no, then suggest appropriate primary key.
(c) Is there any foreign key in any of these relations?
Uttar Pradesh UpmspTextbookSubjective· 4mImportance★★★★★
41% · 12/29 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Movie_ID is the correct primary key for MOVIE; AudiNo alone is not sufficient as the primary key for AUDI because one movie can play in multiple auditoriums — the correct key is a composite (AudiNo, Movie_ID); Movie_ID in AUDI is a foreign key referencing MOVIE.

This is a database schema design question — it tests your understanding of primary keys, composite keys, and foreign keys in the context of a real-world relationship. The key insight is that the problem statement tells you "one movie can be shown in more than one auditorium." That single sentence dictates everything about the keys.

Let's examine each relation carefully.

  1. Primary key for MOVIE The MOVIE relation has three attributes: Movie_ID, MovieName, ReleaseDate. Movie_ID is a unique identifier assigned to each movie — no two movies share the same ID. It is minimal (one attribute is enough) and stable (it won't change). That satisfies every property of a primary key. So yes, Movie_ID is the correct choice.
    Watch out

    Never confuse "natural key" with "primary key." MovieName might seem like a candidate, but two movies could have the same name (remakes, different languages), and names can change. Movie_ID is artificial but reliable — that's exactly what primary keys are for.

  2. Primary key for AUDI The AUDI relation has: AudiNo, Movie_ID, Seats, ScreenType, TicketPrice. AudiNo alone is not a valid primary key. Why? Because the same auditorium (say AudiNo = 3) can show multiple movies at different times — and the problem explicitly says one movie can be shown in more than one auditorium. So the same AudiNo will appear with different Movie_ID values. AudiNo alone cannot uniquely identify a row. The correct primary key is a composite key: (AudiNo, Movie_ID). Together, these two attributes uniquely identify which movie is playing in which auditorium. No two rows will have the same pair. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.