1 Introduction
The main purpose of our online ticket booking system is to revolutionize the way customers
purchase cinema tickets by offering a seamless, convenient, and automated experience. Our system
serves as an alternate avenue for patrons to secure their tickets, bypassing the traditional hassle of
queuing at the box office. Once the customer's data is inputted into our robust database, our
dedicated staff can rest assured that the entire process is hands-free from thereon. Orders are
efficiently received through the system and seamlessly processed without any manual intervention
required. This automation not only enhances the efficiency of our operations but also ensures a
swift and hassle-free booking experience for our valued customers, thereby elevating their overall
satisfaction with our service.
2 Application Users
In an online ticket booking system for cinema, the application users encompass a diverse range
of individuals, each playing a crucial role in the seamless functioning of the platform. Firstly, there
are the customers, or end-users, who utilize the system to browse available movie listings, select
preferred showtimes, and purchase tickets from the comfort of their homes or on the go. These
users seek convenience, reliability, and ease of use, expecting a hassle-free experience from start
to finish. Then, there are the administrators or staff members responsible for managing the system
behind the scenes. These individuals oversee various aspects such as updating movie schedules,
monitoring ticket sales, and resolving any technical issues that may arise. Their primary goal is to
ensure the smooth operation of the platform and provide timely support to customers whenever
needed. Additionally, there may be other stakeholders involved, such as cinema owners or third-
party vendors, who collaborate with the system to facilitate ticket sales and optimize business
processes. Ultimately, the collective engagement of these application users is integral to the success
and efficiency of the online ticket booking system, catering to the needs of both customers and
service providers alike.
3 Functions Overview
The following functionality will be supported by the stadium reservation system.
1. User Registration and Login.
2. Movie Listings.
3. Showtimes & Seat Selection.
4. Booking and Payment.
1
4 Detailed Functional Requirements
4.1 User Registration and Login:
● Users should be able to register with the system using their email or social media accounts and
login securely.
4.2 Movie Listings:
● The system should display a list of movies currently playing or upcoming, along with details
such as title, synopsis, genre, duration, and ratings.
4.3 Showtimes & Seat Selection:
● Users should be able to view showtimes for each movie, including dates, times, and available
theatres.
● Users should be able to select seats for the desired showtime from an interactive seating map.
4.4 Booking and Payment:
● Once seats are selected, users should be able to proceed to booking and make payments
securely using various payment methods (credit/debit cards, mobile wallets, etc.).
4.5 Reviews and Ratings:
● Users should be able to read and leave reviews/ratings for movies they have watched.
5 Entities and Relationships
5.1 Entities and Relationships
Entities:
i. User
ii. Movie
iii. ShowTime
iv. Booking
Relationships:
i. User has a many-to-many relationship with Booking, as a user can make multiple
bookings, and each booking is made by one user.
ii. Showtime has a one-to-many relationship with Booking, as a showtime can have
multiple bookings, but each booking is for one showtime.
2
iii. Booking has a one-to-one relationship with Payment, as each booking corresponds
to one payment transaction
iv. Theater has a one-to-many relationship with Seat, as a theater can have multiple
seats, but each seat is in one theater.
6 Entity Relationship Diagram
Fig.1 ER-Diagram for Stadium Reservation System
3
7 Schema Diagram
Fig.3 Schema Diagram for Stadium Reservation System
8 Functional Dependencies and Normalization
8.1 Schema.
8.2 Functional Dependencies.
S.No Relation Set of FD BCNF Checking
Name
4
1.
2.
3.
4.
9. Data Dictionary
9.1 Match
Match relation:
5
Attribute Data Type Constraints Remarks
Match_nam Varchar(100) Primary key Name of the match
e
Stadium Varchar(100) - Name of the stadium
Price Number - Total fare of a match
Time Varchar(50) - Match timings
Match_date Date - Date of each matches
Seats_left Number - Number of available seats
User_name Varchar(100) Foreign key Name of the user currently
logged in
9.2 Users
Users relation:
Attribute Data Type Constraints Remarks
Name Varchar(100 Primary key Name of the user
)
password Varchar(100 - User’s current password
)
Age Number - Age of the user
Mail_id Varchar(100 - Mail id of the user
)
DOB Date - Date of birth of the user
Phone_no Varchar(20) - User’s Mobile Number
Match_na Varchar(100 - Name of the match
me )
9.3 Tickets_booking
6
Tickets_booking relation:
Attribute Data Type Constraints Remarks
Name Varchar(100 - Name of the user who
) booked tickets
Seat_no Number - Seat_no of the particular
user
Class Varchar(50) - Class name of the
booked ticket
Booking_d Date - Date of the ticket that
ate gets booked
Stadium Date - Date of birth of the user
Price Number - Price of the booked ticket
Seats_left Number(38) - Number of seats left for
that match which the user
has booked
9.4 Payment
Payment relation:
Attribute Data Type Constraints Remarks
Price Number - Total fare of the booked
tickets
mod Varchar(50) - Payment mode(cash/card)
Id Varchar(50) Foreign key Name of the user who
made payment
7
10. Complete Database for Online Movie Ticket Booking System
10.1 Match Relation
MATCH_ STADIU PRICE TIM MATCH SEATS_L USER_NA
NAME M E _DATE EFT ME
Ind vs Aus Stadium 50.00 10:00 2024-05- 100 Alice
A AM 15
NZ vs Pak Stadium B 40.00 02:00 2024-05- 120 Bob
PM 16
Aus vs Stadium D 55.00 08:00 2024-05- 90 David
Eng PM 18
10.2 Users Relation
NAME PASSWO AGE MAI DOB PHONE_N MATCH_
RD L_ID O NAME
Alice alice123 25 alice 1997-04- 987654321 Alice
@exa 15 0
mple.
com
Bob bob456 28 bob@ 1994-09- 123123123 NZ vs Pak
exam 22 4
ple.co
m
David david123 22 david 2000-07- 789456123 Ind vs Aus
@exa 05 0
mple.
com
10.3 Tickets_booking Relation
NAME SEAT_N CLASS BOOKIN STADI PRICE SEATS_L
O G_DATE UM EFT
Alice 1 General 2024-04- Stadium 50.00 99
20 A
8
Bob 2 General 2024-04- Stadium 40.00 119
20 B
David 3 General 2024-04- Stadium 55.00 89
20 D
10.4 Payment Relation
Price Mod Id
50.00 Card Alice
40.00 Cash Bob
55.00 Cash David
11. Data Manipulation – SQL queries
11.1 Using simple SELECT statement (FROM clause) alone.
11.2 Using WHERE clause in the SELECT statement.
11.3 Using GROUP BY clause in the SELECT statement.
|------------|-------------|
| Ind vs Aus | 1 |
11.4 Using the HAVING clause in the SELECT
9
statement.
11.5 Using ORDER BY Clause in the SELECT statement.
11.6 Using sub query.
11.7 Using Nested query.
11.8 Using DATE functions.
11.9 Using the operators like SOME, ALL, IN, EXISTS, ANY.
12. Database Objects
12.1 Views:
10
12.2 Sequence:
11
12.3 Synonym:
12.4 Index:
12
13. PL/SQL Sub Programs
13.1 Procedures with cursors:
13.2 Functions with cursors:
13.3 Packages:
13.4 Triggers:
14. Application Design using Higer Level Language
14.1 JDBC:
JDBC (Java Database Connectivity) is a Java API that allows Java programs to
interact with databases. It provides methods to query and update data in a database, and it is widely
used for database connectivity in Java applications.
Below is the implementation of my application ( Online Movie Ticket
Booking System Using JDBC):
import java.sql.*;
import java.util.Scanner;
public class DMLExample {
13
public static void main(String[] args) {
try {
// Load the JDBC driver
Class.forName("oracle.jdbc.driver.OracleDriver");
// Connection details
String URL = "jdbc:oracle:thin:@localhost:1521:xe"; // JDBC
URL for the Oracle database
String username = "system"; // Username for connecting to the
database
String password = "yoga"; // Password for connecting to the
database
// Establish the connection
Connection con = DriverManager.getConnection(URL,
username, password);
System.out.println("Connected to the database.");
// Scanner object for user input
Scanner scanner = new Scanner(System.in);
// Prompt user for choice
14
System.out.println("Enter your choice (1: Insert, 2: Update, 3:
Delete): ");
int choice = scanner.nextInt();
switch (choice) {
case 1: // Insert
System.out.println("Enter movie_id: ");
int movieId = scanner.nextInt();
System.out.println("Enter movie_name: ");
String movieName = scanner.next();
System.out.println("Enter release_date (yyyy-mm-dd): ");
String releaseDateStr = scanner.next();
Date releaseDate = Date.valueOf(releaseDateStr);
// Inserting records into the movies table
try (PreparedStatement insertMovieStmt =
con.prepareStatement("INSERT INTO movies VALUES (?, ?, ?)")) {
insertMovieStmt.setInt(1, movieId);
insertMovieStmt.setString(2, movieName);
insertMovieStmt.setDate(3, releaseDate);
int movieInsertResult =
15
insertMovieStmt.executeUpdate();
System.out.println(movieInsertResult + " record(s)
inserted into movies table.");
break;
case 2: // Update
System.out.println("Enter movie_id: ");
int updateMovieId = scanner.nextInt();
System.out.println("Enter new movie_name: ");
String newMovieName = scanner.next();
// Updating records in the movies table
try (PreparedStatement updateMovieStmt =
con.prepareStatement("UPDATE movies SET movie_name = ?
WHERE movie_id = ?")) {
updateMovieStmt.setString(1, newMovieName); // New
movie name
updateMovieStmt.setInt(2, updateMovieId); // Movie ID
int movieUpdateResult =
updateMovieStmt.executeUpdate();
System.out.println(movieUpdateResult + " record(s)
updated in movies table.");
16
}
break;
case 3: // Delete
System.out.println("Enter movie_id to delete: ");
int deleteMovieId = scanner.nextInt();
// Deleting records from the movies table
try (PreparedStatement deleteMovieStmt =
con.prepareStatement("DELETE FROM movies WHERE movie_id =
?")) {
deleteMovieStmt.setInt(1, deleteMovieId); // Movie ID
int movieDeleteResult =
deleteMovieStmt.executeUpdate();
System.out.println(movieDeleteResult + " record(s)
deleted from movies table.");
break;
default:
System.out.println("Invalid choice!");
17
// Closing resources
con.close();
scanner.close();
System.out.println("Disconnected from the database.");
} catch (Exception e) {
e.printStackTrace();
15. Results/ Demo for the Application
So, First we login to the system with username and password that we already data has been fed into
the database. Then it takes into another page where we select movie and then after we selecting
movie another page comes then we select show timings. After selecting show timings it takes into
another page there we select number of tickets we want. After selecting number of tickets it takes
into another page there we print ticket with cost.
18
19
20
21
22
23