Final DBMS Report
Final DBMS Report
1 Abstract
Movie Ticket Booking System is a computerized solution for theatre setups, which will automate
the process of Ticket Sale and Customer Bookings. This application will allow users to browse
movies filtering them based on location, price, rating, genre, timing and age. The home page
will display movies based on filters selected by the user. Once a movie is selected, the users will
be redirected to a page dedicated to the selected movie where booking details, timings, movie
rating and locations will be displayed. On selecting booking options, the user will be directed
to a booking page. Users can choose their preferred seats and show based on availability
and preference and make reservations by submitting a form. Once a user has watched a movie,
he/she can mark it as completed, rate the movie based on his/her experience and give feedback.
This feedback will be reflected in the rating of the respective movie. Users must login to
the application after creating an account for themselves in order to make a booking. Each
user profile will maintain a history of all previous bookings of the user logged in. Also, this
application will allow admins to have a separate login through which they will be able to
add, modify and delete movies from the application. Users will be able to change passwords
based on their need and also reset it in case it is forgotten. Through this project we aim
at implementing various Database Management System concepts like transaction management
and Database security while improving our software development skills.
1
2 Introduction
Movie Ticket Booking Systems are used all around the world for booking and reserving movies
online. These applications and websites provide customers with facilities to view movie avail-
ability online and make reservations with just a few steps.
Since movie ticket booking systems are used at such a large scale and have a lot
of practical application as well as value, we picked this for our project. Our movie ticket
management system, implemented in Django + MySQL allows users to easily make movie
reservations. When a user first visits the website they are redirected to a home dashboard
where all the different movies that are currently in the database are listed along with some
key information regarding the movie including a brief description, PG rating, duration, genre
etc. Users have the option to filter movies based on their personal preferences and choice. This
can be done using the filter sidebar which allows users to filter over various different attributes
including but not limited to PG rating, duration, language and genre. Users can also search
for a particular movie using the search bar located at the top of the page.
In order to make a booking all users must first login to their personal account. If the
user does not have an account, they must make one before they can proceed to make a booking.
Once a user has logged in, they can select the movie that they wish to make a reservation on.
This will redirect the user to a movie page which contains all details regarding the chosen
movie. Next the user must click on ‘Book Now’ in order to make a reservation. Users are
now redirected to a Booking page where the user can reserve a selected amount of seats for a
particular show. Once the booking is completed successfully, the reservation will be displayed
on the users profile.
The admin has the option to add and delete movies. The users can also reset their
login password and change their profile picture in the website. The users also have the option
of providing a feedback on the website experience through a feedback forum. This project
replicates the working of a real life movie ticket booking system.
2
3 ER Diagram
3
4 Source Code
Filtering the movies based on language, genre, Duration, PG Rating and ordering based on
release date
d e f home ( r e q u e s t ) :
i f r e q u e s t . method == ’GET’ :
# Get l a n g u a g e
i f l e n ( r e q u e s t .GET. g e t l i s t ( ’ language ’ ) ) == 0 : # No l a n g u a g e s e l e c t e d
LANGUAGES = ” (SELECT l a n g u a g e FROM dashboard movie ) ”
else :
LANGUAGES = r e q u e s t .GET. g e t l i s t ( ’ language ’ )
# Get g e n r e
i f l e n ( r e q u e s t .GET. g e t l i s t ( ’ genre ’ ) ) == 0 : # No g e n r e s e l e c t e d
GENRES = ” (SELECT g e n r e FROM dashboard movie ) ”
else :
GENRES = r e q u e s t .GET. g e t l i s t ( ’ genre ’ )
# Get max d u r a t i o n
i f r e q u e s t .GET. g e t ( ’ d u r a t i o n ’ ) :
DURATION = r e q u e s t .GET. g e t ( ’ d u r a t i o n ’ )
else :
DURATION = ” (SELECT MAX( d u r a t i o n ) FROM dashboard movie ) ”
# Get max p g r a t i n g
i f r e q u e s t .GET. g e t ( ’ p g r a t i n g ’ ) :
PG RATING = r e q u e s t .GET. g e t ( ’ p g r a t i n g ’ )
else :
PG RATING = ” (SELECT MAX( p g r a t i n g ) FROM dashboard movie ) ”
# Get o r d e r b y
i f r e q u e s t .GET. g e t ( ’ o r d e r b y ’ ) :
ORDER BY = r e q u e s t .GET. g e t ( ’ o r d e r b y ’ )
else :
ORDER BY = ” r e l e a s e d a t e ”
4
# Get d e s c
i f r e q u e s t .GET. g e t ( ’ desc ’ ) :
DESC = ”DESC”
else :
DESC = ””
d e f book ( r e q u e s t , pk ) :
i f r e q u e s t . method == ’POST ’ :
5
b form = BookingForm ( r e q u e s t .POST)
i f b form . i s v a l i d ( ) :
b form . i n s t a n c e . u s e r = r e q u e s t . u s e r
b form . s a v e ( )
messages . s u c c e s s ( r e q u e s t , f ’ Your Booking Was S u c c e s f u l l ’ )
return r e d i r e c t ( ’/ ’)
else :
b form = BookingForm ( )
Front-end of a movie page where the user can see the movie details and book a show
6
5 Results
Figure 2: Dashboard
7
Figure 4: Profile Page
Figure 6: Movies
8
Figure 7: Tables
9
6 References:
3. Django Documentation
4. Django Tutorial
10