Movie Ticket Booking System (ER Diagram)

An ER diagram for a multiplex cinema booking system. The data model allows a customer to reserve a seat for a scheduled movie.

Cinema Reservation System - ERD Example

The data model of the movie ticket booking system supports multiple auditoria and multiple showtimes for a movie. The seats in an auditorium are organized in rows and may specify their type.

Movie Ticket Booking System (ER Diagram)
Movie Ticket Booking System (ER Diagram)

The data model includes the following entities:

  • Auditorium
  • Row
  • Seat
  • SeatType - Standard, Left Love Seat, Right Love Seat
  • Reservation
  • Customer
  • Movie
  • Scheduled Movie

Download ER Diagram for Movie Ticket Booking System

Cinema Ticket System (ER Diagram)

Comments

Abhimun 13 May 2021 12:35:33

How to persist seat availability data

Hi,

Thanks for the data model.

My requirement is that user can book seats for a particular theatre for a particular movie at a specific show time.

How can I maintain availability status of a seat for that show time.

If the check the master seat table for the total seats, in which data layer I can set a boolean say, "isAvaialble" for that show against a particular seatID.

How would be the data join?

Could you please provide an idea to achieve this requirement?

Many Thanks

Dusan Rodina - softwareideas.net 13 May 2021 17:21:47

RE: How to persist seat availability data

Hi,

You are welcome.

The described requirement can be achieved with the given model. If you find a reservation for the seat and the scheduled movie (that defines the movie and its show time), the seat is not available.

You can also modify the model so that the Reservation entity will include the IsAvailable flag and after scheduling a movie, the reservations (records) will be initialized for all seats with IsAvailable set to True.

In the original model, if this query returns a row the seat is taken. Otherwise, for an empty result, the seat is free.

SELECT * FROM Reservation

INNER JOIN Seat ON Seat.ID = Reservation.SeatID

WHERE

Seat.Number = <ChosenSeat>

AND Reservation.MovieID = <ChosenMovieAtShowTime>

You can also join the ScheduledMovie entity if you want to select the movie by its time. If you want to select the data also by movie name, you can also join the Movie entity.

New Comment

Comment