Professional Documents
Culture Documents
finialDbms
finialDbms
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 movie 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
1
ONLINE MOVIE TICKET BOOKING SYSTEM
3 Functions Overview
The following functionality will be supported by the online movie ticket booking
system.
1. User Registration and Login.
2. Movie Listings.
3. Showtimes & Seat Selection.
4. Booking and Payment.
● Users should be able to register with the system using their email or social media accounts
and login securely.
● The system should display a list of movies currently playing or upcoming, along with details
such as title, synopsis, genre, duration, and ratings.
● 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.
● 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.).
2
ONLINE MOVIE TICKET BOOKING SYSTEM
3
ONLINE MOVIE TICKET BOOKING SYSTEM
7.Schema Diagram
Movie_Info:
Screen_No (Unique identifier for each screen in the cinema)
Show_Time (Time at which the movie is scheduled to be shown)
Curr_Movie (Current movie being shown)
Upcoming_Movie (Movie scheduled for future screenings)
Explanation:
Movie_Info holds information about movies, their showtimes, and the type of seats
available. It may not have direct relationships with the other entities unless it's
4
ONLINE MOVIE TICKET BOOKING SYSTEM
Booking_Transaction:
Ticket_No (Unique identifier for each booking transaction)
Movie_Name (Name of the movie booked)
Show_Time (Time of the show for the booked movie)
Movie_Date (Date of the booked movie)
Screen_No (The screen where the movie is booked)
Explanation:
Booking_Transaction records individual bookings made by users. It has a many-to-
one relationship with both Login and Movie_Info, as multiple bookings can be made
by one user for different movies and showtimes.
Payment_Transaction:
Ticket_No (Unique identifier for each payment transaction, possibly the same as in
Booking_Transaction)
Movie_Date (Date of the movie for which payment is made)
Acc_No (Account number used for payment)
Bank_Name (Name of the bank used for payment)
Explanation:
Payment_Transaction records individual payments made for bookings. It has a
many-to-one relationship with both Login and Booking_Transaction, as one user can
make multiple payments for different bookings
movie_info(screen_no,show_time ,curr_movie,upcoming_movie,type_seat)
booking_transaction(ticket_no ,movie_name,show_time,movie_date,screen_no)
payment_transaction(ticket_nomovie_dateacc_nobank_name)
5
ONLINE MOVIE TICKET BOOKING SYSTEM
9. Data Dictionary
9.1 Users
6
ONLINE MOVIE TICKET BOOKING SYSTEM
9.2 Movie_Info
9.3 Booking_Transaction
9.4 Payment
7
ONLINE MOVIE TICKET BOOKING SYSTEM
8
ONLINE MOVIE TICKET BOOKING SYSTEM
9
ONLINE MOVIE TICKET BOOKING SYSTEM
10
ONLINE MOVIE TICKET BOOKING SYSTEM
|---------|----------|-----|-------------------|-----------|------------|------------|
11
ONLINE MOVIE TICKET BOOKING SYSTEM
|---------|----------|-----|-------------------|-----------|------------|------------|
movie_name
--------------
Inception
The Shawshank Redemption
Forrest Gump
|---------|----------|-----|-------------------|-----------|------------|------------|
customer_id
-----------
101
102
103
104
|---------|----------|-----|-------------------|-----------|------------|------------|
movie_id | movie_name
---------|------------------
1 | Inception
4 | Interstellar
|---------|----------|-----|-------------------|-----------|------------|------------|
12
ONLINE MOVIE TICKET BOOKING SYSTEM
|---------|----------|-----|-------------------|-----------|------------|------------|
|---------|----------|-----|-------------------|-----------|------------|------------|
movie_id | total_tickets_sold
---------|--------------------
1 | 150
2 | 200
3 | 180
|---------|----------|-----|-------------------|-----------|------------|------------|
genre | total_tickets_sold
---------|--------------------
13
ONLINE MOVIE TICKET BOOKING SYSTEM
Action | 300
Comedy | 250
Drama | 180
|---------|----------|-----|-------------------|-----------|------------|------------|
movie_id | average_ticket_price
---------|----------------------
1 | 10.50
2 | 9.75
3 | 11.25
|---------|----------|-----|-------------------|-----------|------------|------------|
movie_id | total_tickets_sold
---------|--------------------
1 | 150
2 | 200
3 | 180
|---------|----------|-----|-------------------|-----------|------------|------------|
director | total_movies
-------------------|--------------
Christopher Nolan | 4
Steven Spielberg | 5
14
ONLINE MOVIE TICKET BOOKING SYSTEM
|---------|----------|-----|-------------------|-----------|------------|------------|
customer_id | total_bookings
-------------|----------------
ABC123 |8
XYZ789 |6
|---------|----------|-----|-------------------|-----------|------------|------------|
movie_id | total_tickets_sold
---------|--------------------
2 | 200
1 | 150
3 | 130
4 | 120
5 | 100
|---------|----------|-----|-------------------|-----------|------------|------------|
|---------|----------|-----|-------------------|-----------|------------|------------|
15
ONLINE MOVIE TICKET BOOKING SYSTEM
customer_id | total_amount_spent
-------------|-------------------
ABC123 | 120.50
XYZ789 | 95.75
DEF456 | 87.25
movie_name | release_date
-----------------------|--------------
Inception | 2021-08-05
The Shawshank Redemption | 2023-05-01
|---------|----------|-----|-------------------|-----------|------------|------------|
director
-------------
Christopher Nolan
Frank Darabont
SELECT genre
FROM movies
WHERE movie_id IN (SELECT movie_id
FROM ticket_bookings
GROUP BY movie_id
HAVING COUNT(*) > 100);
|---------|----------|-----|-------------------|-----------|------------|------------|
16
ONLINE MOVIE TICKET BOOKING SYSTEM
genre
------
Action
Drama
|---------|----------|-----|-------------------|-----------|------------|------------|
movie_name | director
-----------------------|-------------
Inception | Christopher Nolan
The Shawshank Redemption | Frank Darabont
|---------|----------|-----|-------------------|-----------|------------|------------|
customer_id
-------------
ABC123
XYZ789
17
ONLINE MOVIE TICKET BOOKING SYSTEM
|---------|----------|-----|-------------------|-----------|------------|------------|
movie_name | genre
-----------------------|----------
Inception | Action
Forrest Gump | Drama
|---------|----------|-----|-------------------|-----------|------------|------------|
|---------|----------|-----|-------------------|-----------|------------|------------|
|---------|----------|-----|-------------------|-----------|------------|------------|
18
ONLINE MOVIE TICKET BOOKING SYSTEM
12.2 Sequence:
19
ONLINE MOVIE TICKET BOOKING SYSTEM
12.3 Synonym:
20
ONLINE MOVIE TICKET BOOKING SYSTEM
12.4 Index:
21
ONLINE MOVIE TICKET BOOKING SYSTEM
Example 1:
Example 2:
OPEN user_booking_cursor;
user_booking_loop: LOOP
FETCH user_booking_cursor INTO booking_id, booking_date, show_id;
IF done THEN
LEAVE user_booking_loop;
END IF;
-- Process the user bookings here (e.g., display or store them)
END LOOP;
CLOSE user_booking_cursor;
END;
22
ONLINE MOVIE TICKET BOOKING SYSTEM
Example 1:
Function to Check Seat Availability for a Movie Show:
CREATE FUNCTION CheckSeatAvailability(show_id INT, seat_id INT) RETURNS
BOOLEAN
BEGIN
DECLARE is_available BOOLEAN;
SELECT booked INTO is_available FROM seats WHERE show_id = show_id AND seat_id
= seat_id;
RETURN NOT is_available;
END;
Example 2:
23
ONLINE MOVIE TICKET BOOKING SYSTEM
BEGIN
-- Implementation to book a ticket
END BookTicket;
Example 2:
24
ONLINE MOVIE TICKET BOOKING SYSTEM
// 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
25
ONLINE MOVIE TICKET BOOKING SYSTEM
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);
case 2: // Update
System.out.println("Enter movie_id: ");
int updateMovieId = scanner.nextInt();
System.out.println("Enter new movie_name: ");
String newMovieName = scanner.next();
26
ONLINE MOVIE TICKET BOOKING SYSTEM
int movieUpdateResult =
updateMovieStmt.executeUpdate();
System.out.println(movieUpdateResult + " record(s)
updated in movies table.");
}
break;
case 3: // Delete
System.out.println("Enter movie_id to delete: ");
int deleteMovieId = scanner.nextInt();
default:
System.out.println("Invalid choice!");
}
// Closing resources
con.close();
scanner.close();
System.out.println("Disconnected from the database.");
} catch (Exception e) {
e.printStackTrace();
}
}
}
27
ONLINE MOVIE TICKET BOOKING SYSTEM
28
ONLINE MOVIE TICKET BOOKING SYSTEM
29
ONLINE MOVIE TICKET BOOKING SYSTEM
30
ONLINE MOVIE TICKET BOOKING SYSTEM
31
ONLINE MOVIE TICKET BOOKING SYSTEM
32
ONLINE MOVIE TICKET BOOKING SYSTEM
33
ONLINE MOVIE TICKET BOOKING SYSTEM
34