I am working on an app that allows users to book movie tickets.
I have already created the tables for movie and actor and done the relationship between them.
Now, I am stuck on the Tickets
table. I have the following attributes: seat, date, time, movie
, etc. Suppose the cinema has 100 seats.
Here is an example:
Movie: Furious 7
Date: 20/06/2015
Time: 2:30 pm
Do I have to create 100 different rows in the Tickets
table having the same moovie, date, time BUT different in the seat?
You use two tables just like the movies and actors. First is the movie details like time and date, second is ticket details like seat number, status etc. which references the movie id.
You could have more tables to normalize theater rooms. Like theater room and then theater seat which reference a theater room each