-
Thông tin
-
Hỏi đáp
Cinema Booking System Project | Bài báo cáo cuối kỳ học phần Principles of Database Management | Trường Đại học Quốc tế, Đại học Quốc gia Thành phố Hồ Chí Minh
Persay the user decides to book a ticket, they select a movie and request to book a ticket. The System presents the movie details and available seats. The user selects the desired seat(s) and confirms the booking. This step ensures that the user can easily book a ticket for their desired show. In this step, the user requests to view their account information. The System exports and displays the user's account detailings. Letting the user choose to edit their personal information if necessary. This step allows the user to view and secure their personal information easily . Tài liệu giúp bạn tham khảo, ôn tập và đạt kết quả cao. Mời bạn đón xem.
Principle of database management 3 tài liệu
Trường Đại học Quốc tế, Đại học Quốc gia Thành phố Hồ Chí Minh 695 tài liệu
Cinema Booking System Project | Bài báo cáo cuối kỳ học phần Principles of Database Management | Trường Đại học Quốc tế, Đại học Quốc gia Thành phố Hồ Chí Minh
Persay the user decides to book a ticket, they select a movie and request to book a ticket. The System presents the movie details and available seats. The user selects the desired seat(s) and confirms the booking. This step ensures that the user can easily book a ticket for their desired show. In this step, the user requests to view their account information. The System exports and displays the user's account detailings. Letting the user choose to edit their personal information if necessary. This step allows the user to view and secure their personal information easily . Tài liệu giúp bạn tham khảo, ôn tập và đạt kết quả cao. Mời bạn đón xem.
Môn: Principle of database management 3 tài liệu
Trường: Trường Đại học Quốc tế, Đại học Quốc gia Thành phố Hồ Chí Minh 695 tài liệu
Thông tin:
Tác giả:
Tài liệu khác của Trường Đại học Quốc tế, Đại học Quốc gia Thành phố Hồ Chí Minh
Preview text:
VIETNAM NATIONAL UNIVERSITY OF HO CHI MINH CITY INTERNATIONAL UNIVERSITY
SCHOOL OF COMPUTER SCIENCE AND ENGINEERING FINAL REPORT Cinema Booking System Project
Course: Principles of Database Management - IT079IU ADVISOR:
Assoc. Prof. Nguyễn Thị Thúy Loan ABSTRACT
An online system for reserving cinema seats presents numerous advantages for both
movie enthusiasts and cinema operators. For patrons, the primary perk lies in the
1| Cinema Booking System
convenience it offers. They can effortlessly peruse available seat types, compare prices,
and choose seats aligning with their preferences and budget, all from the comfort of their
location at any time, thanks to online payment options. This eliminates the need to endure
long queues at the cinema or engage in phone calls to secure seats. Furthermore, the
system permits users to reserve seats around the clock, ensuring they never miss out on their favorite films.
Cinema operators also stand to gain several benefits from an online seat booking system.
Firstly, it streamlines the booking process, easing the workload on staff and allowing them
to allocate time to other responsibilities. Secondly, the system enhances the management
of seat availability, minimizing the chances of double-bookings or overbooking. This
contributes to a seamless experience for users, eliminating the need for last-minute seat
adjustments. Additionally, the system generates valuable data insights that can be
leveraged to optimize pricing, refine marketing strategies, and elevate the overall viewing experience.
Overall, a cinema booking system proves advantageous for both moviegoers and cinema
operators, offering convenience, efficiency, and data-driven insights to enhance the
reservation process and improve the overall cinematic experience. Consequently, it's not
surprising that an increasing number of cinemas are adopting such systems to stay
abreast of the evolving demands in the contemporary entertainment industry.
Group 6 Project’s Member No. Full Name ID Role Contribution 1 Lê Tuấn Phúc ITCSIU21096 Leader 21.25% 2 Nguyễn Hoàng Phúc ITITWE21082 Member 21.25% 3 Nguyễn Ngọc Bảo ITITWE21069 Member 21.25% Hân 4 Hồ Ngọc An ITITIU21146 Member 15% 5 Đỗ Hoàng Minh ITITWE22142 Member 21.25%
Table 1: The contribution and information of all project members
3| Cinema Booking System TABLE OF CONTENTS
Group 6 Project’s Member..................................................................................................................................
Chapter 1. ............................................................................................................................................................
Introduction..........................................................................................................................................................
1.1. Plan..................................................................................................................................................... 1.2.
Requirements......................................................................................................................................
1.2.1 Login (Authorization):.........................................................................................................................
1.2.2 View All Movie:..................................................................................................................................
1.2.3 Book a Ticket :...................................................................................................................................
1.2.4 View Account (Edit Personal Information):......................................................................................... Chapter
2. ............................................................................................................................................................
Entity Relationship Diagram...............................................................................................................................
2.1. Entity Description to ERD(2) model.....................................................................................................
2.2. Analyzing Relationship Of System.......................................................................................................
2.2.1 User and Ticket Relationship:...........................................................................................................
2.2.2 Ticket and Show Relationship:...........................................................................................................
2.2.3 Auditorium and Seat Relationship:.....................................................................................................
2.2.4 Show to Seat Relationship:................................................................................................................
2.2.5 Show and Movie Relationship:...........................................................................................................
2.2.6 Ticket and Comment Relationship:....................................................................................................
2.3. Database Schema Analysis................................................................................................................. Chapter
3. ............................................................................................................................................................
SQL.......................................................................................................................................................................
Chapter 4. ............................................................................................................................................................
Application...........................................................................................................................................................
4.1 Tools and Application Used..................................................................................................................
4.2. Framework and Database....................................................................................................................
4.2.1 Frameworks.......................................................................................................................................
4.2.2 Databases (PostgreSQL)...................................................................................................................
4.3. Application’s Architecture..................................................................................................................... Chapter
5. ............................................................................................................................................................
5.1. Future Work.........................................................................................................................................
5.1.1 Implementing more User Interface (UI).............................................................................................
5.1.2 Complete the security system............................................................................................................
5.1.3 Packaging..........................................................................................................................................
5.1.4 Deployment........................................................................................................................................
5.2 Summary.............................................................................................................................................. LIST OF FIGURES
Figure 2.1: ER Diagram for the Cinema Booking System...............................................................................
Figure 2.3: Database Schema for Cinema booking system.............................................................................
Figure 3.1: Answer 1........................................................................................................................................
Figure 3.2: Answer 2.........................................................................................................................................
Figure 3.3: Answer 3.........................................................................................................................................
Figure 3.4: Answer 4.........................................................................................................................................
Figure 3.5: Answer 5.........................................................................................................................................
Figure 3.6: Answer 6.........................................................................................................................................
Figure 3.7: Answer 7.........................................................................................................................................
Figure 3.8: Answer 8.........................................................................................................................................
Figure 3.9: Answer 9.........................................................................................................................................
Figure 3.10: Answer 10.....................................................................................................................................
Figure 3.11: Answer 11.....................................................................................................................................
Figure 3.12: Answer 12.....................................................................................................................................
Figure 3.13: Answer 13.....................................................................................................................................
Figure 4.2: The API access Layer.....................................................................................................................
Figure 4.3: The Service Layer..........................................................................................................................
Figure 4.4: The Data Access Layer..................................................................................................................
Figure 4.5: Entity Class..................................................................................................................................... LIST OF TABLES
Table 1: The contribution and information of all project members....................................................................
Table 1.1: Table of timeline.............................................................................................................................. Chapter 1. Introduction 1.1. Plan
The purpose of this report is to provide an overview of a cinema booking system. The
report covers the system's architecture, design, implementation, and evaluation, and is
5| Cinema Booking System
intended for stakeholders involved in its development, implementation, and maintenance.
The report also serves as a resource for anyone interested in learning more about online cinema booking systems.
Table 1.1: Table of timeline Week Time Frame Task 1 - 4 18/9-8/10
Learn Basics of SQL, Spring Boot Framework, ER
Diagram Draft, Javascript-ES6, HTML-CSS 5 - 8 16/10-12/11
Implement basic Structure and Business Logic System 9 - 12 13/11 –
Implement basic Authentication using Spring Security 10/12 (Submitting report) 13 (Deadline) 11/12 –
Implement the Back - End application with Business 19/12
Logic and complete Testing (Presentation) To be more specific:
During the project timeline, the focus will be on developing a back-end application. The timeline is as follows:
- From September 18 to October 10th, the leader instructs the member to yields the
basics of SQL, Spring Boot Framework, and ER Diagram Draft via lectures, e- books
- From October 16th to November 12th, the leader will guide how to implement the
basic structure and business logic of the application. It is essential to complete this
phase ensuring members have the grasp for the back-end to front-end connection.
Each member will need to learn HTML,CSS,JScript,ES6.
- From November 13th to December 10th, the team members will work on
implementing basic authorization using Spring Security.
- From December 10th to December 17th, the team members will implement the
back-end application with business logic to the front-end and finish testing for presentation. 1.2. Requirements
As stated in the project requirements, there is a need to design and structure the database
for an online booking system. Thus involving utilizing a specified Database Management
System and establishing a connection to Java through the Java Persistence API (JPA)(1).
Additionally, the task involves crafting queries and entries tailored to meet the specific
requirements of the ticket booking system.
Without a doubt, our team is aiming for a more ambitious goal. Rather than constructing
a straightforward JPA(1) system merely connecting to a database, we are driven to
construct a comprehensive Full-Stack Web application. This approach goes beyond the
initial requirement, with the intention of creating a robust solution that fully satisfies the
users' needs.. Our public Github’s repository can be found here. The project has been
described thoroughly in the README.md file of our Github.
With hopes of building a complete application, before any coding has been done. We
have designed a Use Case Diagram in which includes all the use cases that the customer
will be doing on our Application.
1.2.1 Login (Authorization):
This step involves the Customer initiating the login process to access the online booking
system. The Customer enters their login credentials, such as a username and password.
The System then verifies the customer's credentials and grants access if they are valid.
This step requires validations that only authorized users can access the system in order to book tickets. 1.2.2 View All Movie:
7| Cinema Booking System
In this step, the user requests to view all available schedules. The System exports and
displays lists of all current movies are up trending. This step allows the Customer to
browse through the available movies and the ones they wish to attend. 1.2.3 Book a Ticket :
Persay the user decides to book a ticket, they select a movie and request to book a ticket.
The System presents the movie details and available seats. The user selects the desired
seat(s) and confirms the booking. This step ensures that the user can easily book a ticket for their desired show.
1.2.4 View Account (Edit Personal Information):
In this step, the user requests to view their account information. The System exports and
displays the user's account detailings. Letting the user choose to edit their personal
information if necessary. This step allows the user to view and secure their personal information easily .
Overall, the use case represents a fundamental interaction between a user and an online
booking system, ensuring that the user can easily view the date, time, type of movies,
book and manage their bookings, and manage their account information. Chapter 2.
Entity Relationship Diagram
2.1. Entity Description to ERD(2) model
1. User: This entity stores information about the customers who make bookings for
events. The attributes of this entity are:
➢ user_id (Primary key): A unique identifier for each user.
➢ address: The address of the user.(optional) ➢ dte_of_birth: The date of birth of the user. ➢ gender: Sex of the user.
➢ tier: Type of member inside the system.
➢ email: The email address of the user.
➢ name: The first name of the user.
➢ phone_number: The phone number of the user.
➢ password: The password holds the user's account.
2. Ticket : This entity stores information about the events that customers can book.
The attributes of this entity are:
➢ ticket_id (primary key): A unique identifier for each movie.
➢ number_of_seats: How many seats does the user purchase.
➢ status: The details of the movie.
This entity also has two foreign keys:
➢ user_id (references User, Foreign key): The customer who purchased the ticket.
➢ show_id (references Show, Primary-key): The movie that was selected by the user.
3. Show : This entity stores information about the bookings made by customers. The
attributes of this entity are:
9| Cinema Booking System
➢ date: The date of the show will be live.
➢ show_id (references Show, Primary-key): The unique identifier for each seat booked by the customer.
➢ This entity also has two foreign keys:
➢ auditorium_id (references Auditorium, Foreign key): Room of the selected film
during that specific period of time.
➢ imdb_id (references Event, Primary-key): The event for which the booking was made.
4. Auditorium: This entity stores information about the location of the film playing.
The attributes of this entity are:
➢ auditorium_id(Primary key): A unique identifier for each auditorium.
➢ cinema_id(references Cinema, Foreign key): The id of the cinema’s location.
➢ seat: Indicates number of seats are available.
5. Cinema: This entity stores information about the cinema in which the addresses
are shown to the user to go. The attributes of this entity are:
➢ cinema_id (primary key): A unique identifier for cinema.
➢ auditorium: Indicates number of auditoriums in a cinema .
6. Movie : This entity describes details of the movie that will be published. The
attributes of this entity are:
➢ imdb_id (primary key): A unique identifier for distinct movies (based on Inte rnet Movie Database)
➢ title: The name of the movie.
➢ year: The year that was created.
➢ rated: Movie classification boards to provide guidance to viewers.
➢ released: The date that will be available to watch.
➢ runtime: The length of the movie.
➢ plot: Summary of the movie.
➢ awards: Winning awards were dedicated.
➢ poster: The frame picture of the film. ➢ ratings: Audiences rated.
➢ metascore: Official website ratings.
➢ imdb_votes: The database information about the films.
➢ type: The variety of the movie.
➢ dvd: The availability of digital discs.
➢ box_office:The profit margin of the film.
➢ production:The process of shooting the films.
➢ website: The mainstream of the film.
➢ tag_line: a short and catchy phrase that is used to convey the essence or theme of the film.
11| Cinema Booking System
➢ tmdb_id: A unique key based on The Movie Database
In summary, the database schema is designed to effectively manage time schedules for
movies, encompassing functionalities such as tracking users who have purchased
tickets and reserved seats for specific shows. Additionally, the schema allows customers
to provide ratings for movies after the conclusion of the show. This comprehensive
design caters to various aspects of movie scheduling, customer interactions, and
feedback, making it a versatile solution for managing a dynamic and interactive movie- going experience.
Figure 2.1: ER Diagram for the Cinema Booking System
2.2. Analyzing Relationship Of System
2.2.1 User and Ticket Relationship: o The relationship between the Customer table
and the Booking table is a one-tomany relationship. o A single user can purchase
multiple tickets, but each ticket is associated with only one user. o The user table has
a primary key called user_id, which uniquely identifies each individual customer. o
The Booking table includes a foreign key called user_id, which references the user_id in the User table. o
By establishing this relationship, the online booking system can accurately
associate bookings with the corresponding users.
2.2.2 Ticket and Show Relationship: o The relationship between the ticket table and
the show table is a many-to-one relationship. o
Each show can have multiple tickets, but each ticket is associated with only one show. o
The Show table has a primary key called show_id, which uniquely identifies each show. o
The Ticket table includes a foreign key called show_id, which references the show_id in the Show table. o
This relationship allows the system to apply to that specific movie they are for.
2.2.3 Auditorium and Seat Relationship: o The relationship between the auditorium
table and the seat table is a one-tomany relationship. o
Each auditorium can have multiple seats, but each seat is associated with only one auditorium. o
The Seat table has a primary key called show_seat_id, which uniquely identifies each seat. o
The Seat table includes a foreign key called auditorium_id, which references the
auditorium in the Auditorium table. o
This relationship allows the system to track the seats reserved for the user.
2.2.4 Show to Seat Relationship: o The relationship between the Show table and the
seat table is a one-to-many relationship.
13| Cinema Booking System o
Many seats in terms of rows and columns can belong to one show. o
The Seat table includes a foreign key called show_id, which references the zone in the Show table. o
This relationship allows the system to assign seats to specific seat zones and
determine pricing based on the type of seats.
2.2.5 Show and Movie Relationship: o The relationship between the Show table and
the Movie table is a many-to-one relationship. o
Each movie can have multiple showtimes, but each show is associated with only one time that movie. o
The Movie table has a primary key called imdb_id, which uniquely identifies each
movie ratings on the database. o
This relationship allows the system to link showtimes to the corresponding movie.
2.2.6 Ticket and Comment Relationship: o The relationship between the Ticket table
and the Comment table is a one-tomany relationship. o
One customer can accommodate multiple comments about the film. o
The Comment table includes a foreign key called ticket_id, which references the
ticket_id in the Ticket table.
These interconnections facilitate the effective management and monitoring of various
aspects within the online booking system, including users, tickets, shows, cinemas,
auditoriums, comments, and movies. This architecture ensures precise representation of
data and seamless functionality within the system. The design enables the system to
effortlessly retrieve pertinent information, such as user ticket purchases, show details,
and assigned seats, contributing to a smooth and fundamental user-friendly experience
for customers utilizing the online booking platform.
2.3. Database Schema Analysis
Figure 2.3: Database Schema for Cinema booking system
The database schema for the User-Ticket-Show-Seat relationship is designed to
efficiently manage and store data related to user information, movie schedules, and seat
reservations. The relationship is defined by several tables, including the User table, Ticket
table, Show table, Auditorium table, and Show-Seat table.
The User table contains information about each user, including their unique user ID,
address, date of birth, email, first name, last name, gender, role, phone number, and
password. The Ticket table stores information about each ticket that has been purchased,
including the date of the purchase and the associated show ID. It also includes foreign
15| Cinema Booking System
keys to link to the User and Show tables, establishing the one-to-many relationship
between user and ticket, and show and tickets.
The Show table contains information about each show schedule, including the show ID,
start_time,end_ time, auditorium_id, imdb_id. It also includes a foreign key to link to the
Ticket table, establishing the one-to-many relationship between Show and Ticket.
The Show-Seat table stores information about each seat, including its unique show seat
ID, status. It includes a foreign key to link to the Ticket table, establishing the oneto-many
relationship between Ticket and Show-Seats.
The Auditorium-Seat table stores information about each seat in each auditorium,
including the auditorium seat id. It includes a foreign key to link to the Seat table,
establishing the one-to-many relationship between Auditorium and Seat.
These tables, linked throughout primary and foreign keys, allow the system to efficiently
manage and track data related to user purchasing tickets, show details, commenting on
the movie, and seat reservations.
The Database schema also satisfies the condition of Normalization which means Third
Normal Form . Let's dive in to each table in detail to assess its compliance with 3NF: - User Table :
The primary key: user_id, uniquely identifies each user in the table.
All other attributes ( name,address, date_of_birth, gender, email, phone_number,
password, tier) are directly dependent on the user_id, indicating there are no transitive dependencies. - Ticket Table:
The primary key: ticket_id, uniquely identifies each ticket in the table.
All other attributes (number_of_seats, timestamp, status,user_id,show_id) are directly
dependent on the ticket_id, indicating no transitive dependencies. - Seat Table:
The primary key:show_seat_id, uniquely identifies each seat in each show in the table.
The attribute status is directly dependent on the Seat, with no transitive dependencies. - Auditorium Table:
The primary key,auditorium_id, uniquely identifies each auditorium room in the table.
All other attributes(name,seats,cinema_id) are directly dependent, indicating no transitive dependencies. - Cinema Table:
The primary key, cinema_id, uniquely identifies each cinema in the table.
All other attributes(name,auditoriums,address,phone_number,email) are directly
dependent on the cinema_id, indicating no transitive dependencies. - Movie Table :
The primary key, imdb_id, uniquely identifies each film in the table.
All other attributes are directly dependent on the imdb_id , indicating no transitive dependencies.
To sum up, the presented relational model adheres to the principles of the Third Normal
Form (3NF). This compliance ensures the elimination of redundancy in the database
structure and upholds data integrity by avoiding transitive dependencies .The
organization of data into distinct tables based on functional dependencies contributes to
17| Cinema Booking System
a well-structured and normalized database design, meeting the criteria of the Third Normal Form. CHAPTER 3. SQL
This section will be covering the JPA(1) application with questions and evidence to
suffice the project’s requirements deadline.
3.1 Show users that have registered to the cinema page.
Figure 3.1: Answer 1
3.2 Find Cinema at the address in District 1.
Figure 3.2: Answer 2
.3 Find the names of all users who purchase exactly 1 ticket.
Figure 3.3: Answer 3
3.4 Find the names of all users who purchase tickets to the movie with original title “Song Of The South”.
Figure 3.4: Answer 4
3.5 Find the names of all users who purchase a ticket to the movie “Napoleon”.
19| Cinema Booking System
Figure 3.5: Answer 5
3.6 Find movies that are scheduled to start at 15 PM.
Figure 3.6: Answer 6
3.7 Find all cinemas that aired the movie title ‘Lightyear’.
Figure 3.7: Answer 7
3.8 Find the ratings of the “Oppenheimer” movie.