0% found this document useful (0 votes)
4 views22 pages

CS_project_2024_25_kanishka_selvy

Uploaded by

Selvy Kushwaha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views22 pages

CS_project_2024_25_kanishka_selvy

Uploaded by

Selvy Kushwaha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

PODDAR BRIO INTERNATIONAL

SCHOOL

COMPUTER SCIENCE (083)


PROJECT
Academic Year:
2024-25 Project
Report on

MOVIE TICKET BOOKING SYSTEM

Group members :
Submitted by:
Kanishka Kolte
SELVY
Selvy Kushwaha KUSHWAHA
Class: 12th Sci.CBSE B
INDEX

S.No. CONTENT Pg.No.


1 Introduction 3
2 Objective 4
3 Advantage 5
4 System Requirement 6
5 Source Codes 7
6 Output Codes 11
7 Conclusion 13
8 Bibliography 14
INTRODUCTION

RMS helps maintain the records of a company in an organized and


accessible manner for the business. RMS will integrate well with the
existing operations of the business through a highly interactive
interface such that change-over to digital record-keeping is very
easy. This avoids the kind of errors that are likely to crop up if these
records are managed manually, improving communication and
efficiency at large.
RMS keeps all records safe and sound; it is accessible at any time if
needed. It could be developed with customized features that meet
the business' precise needs, thereby ensuring that the system works
best for it. The substitution of a place for old-fashioned paper-based
documentation by RMS enhances record management as well as an
entire documentation process.
The ease with which the access to an intuitive graphical user
interface facilitates the storing, managing and retrieving of records
enhances the users' experience. From document storage and
categorization to detailed reporting and data analysis, throughout
RMS, a solution is presented which helps in effective management of
records towards keeping businesses organized and efficient.
The Movie Ticket Booking System allows users to easily book their
movie of choice at the cinema and also allow the cinema owners to
manage data and generate reports effortlessly. This system can be
easily adapted to the existing system, and what is needed to replace
paper-based ticketing is given in a digital form. Use of this system will
bring no manual errors and promote communication since all
booking details are well promoted.
OBJECTIVE
The Movie Ticket Booking System program, essentially a mixture of
Python and MySQL, aims to design an entire system that will run not
only efficiently but also user-friendly in managing movie tickets
booking and inventory. Here, the purpose of the system to be
designed shall be directed towards enhancing the operational
efficiency of cinema owners by providing an interface that is
automatically aligned with already existing operations but will be
relatively intuitive.

All this will be possible because of proper utilization of MySQL for


comprehensive database management and Python for diverse
backend operations, which would efficiently ensure proper tracking
of availability tickets with real-time updates along with detailed
reports. All of these help cinema owners handle a number of
theatres effectively.

The system also provides an enhancement in customer experience


through digitalized booking. It reduces the chances of manual errors
while providing clear communication. The user-interfacing displays
offer a friendly graphical user interface. Customers can therefore
select their desired language, movies, showtimes, and seats and
make the payment without much ado.

The overall aim is to provide a seamless and efficient tool for


effectiveness while improving customer satisfaction and simplifying
the process of booking movie tickets.
ADVANTAGE SCOPE

Our project automates the management of tickets so that less work


is done and errors are fewer. It streamlines booking, data
management, and reporting.
It offers a user-friendly interface for customers to book tickets, select
seats, and make payments, thereby bettering the overall experience
for the customers.
Used on a large scale, it will generate huge volumes of valuable
information in relation to patterns of booking, customer preference,
and sales, which can then be used to make effective business
decisions.
SYSTEM REQUIREMENT

SOFTWARE REQUIREMENTS:

Operating system – Microsoft windows 11 pro


Platform – Python IDLE 3.12.4
Database – MySQL
Language– Python

HARDWARE REQUIREMENTS:

Processor: Intel(R) Celeron(R) N5105 @ 2.00GHz 2.00 GHz


RAM – 8.00 GB
SOURCE CODES

1.Creating Table(file1)
import mysql.connector
import random as r
mydb = mysql.connector.connect(host='localhost', user='root',
password='1234')
mycursor=mydb.cursor()
mycursor.execute("show databases")

for r in mycursor:
print(r)
mycursor.execute("CREATE database Moviebookingsystem")
mycursor.execute("USE moviebookingsystem")
#creating tables
mycursor.execute("""
CREATE TABLE Movie_listings (
mv_id INT PRIMARY KEY,
movie_name VARCHAR(75) NOT NULL,
plot VARCHAR(500),
cast VARCHAR(500)
)
""")

mycursor.execute("""
CREATE TABLE showtimes (
show_time_id INT PRIMARY KEY,
mv_id INT,
movie_name VARCHAR(75),
show_date DATE,
show_time VARCHAR(15),
tickets INT,
Cinema CHAR(30),
FOREIGN KEY (mv_id) REFERENCES Movie_listings(mv_id)
)
""")

mycursor.execute("""
CREATE TABLE bookings (
booking_id INT PRIMARY KEY,
show_time_id INT,
name VARCHAR(75),
phone_number VARCHAR(10),
cost INT,
FOREIGN KEY (show_time_id) REFERENCES
showtimes(show_time_id)
)
""")
2.Adding data into movie_listings and showtimes(file2)
import mysql.connector
import random as r
mydb = mysql.connector.connect(host='localhost', user='root',
password='1234')
mycursor=mydb.cursor()
mycursor.execute("Use moviebookingsystem")
"""# Data to insert
data = [
(1, "Bhool Bhulaiya 3", "In Kolkata, Rooh Baba enters a spooky
estate where he confronts a pair of vindictive ghosts, both asserting
to be Manjulika..", "Vidya Balan, Madhuri Dixit"),
(2, "Insider Out 2", "Joy, Sadness, Anger, Fear and Disgust have
been running a successful operation by all accounts. However, when
Anxiety shows up, they aren't sure how to feel", "Mindy Kaling, Maya
Hawke"),
(3, "Kalki-2898 AD", "A modern avatar of the Hindu god Vishnu, is
said to have descended on Earth to protect the world from evil
forces.", "Amitabh Bacchan,Prabhas"),
(4, "Avatar", "A paraplegic marine on an alien planet fights for its
survival.", "Sam Worthington, Zoe Saldana"),
(5, "Crew", "Hailed as `delectable' by The Times of India, this
Rajesh Krishnan-directed comedy follows three bold flight attendants
caught in a gold smuggling ring.", "Kareena Kapoor,Tabu")
]

# Insert multiple records


mycursor.executemany("INSERT INTO Movie_listings (mv_id,
movie_name, plot, cast)VALUES (%s, %s, %s, %s)", data)
mydb.commit()

print("Five records inserted successfully!")"""


# Data for showtimes based on movies in Movie_listings
showtimes_data = [
(1, 1, "Bhool Bhulaiya 3", "2024-11-20", "4:00 PM", 150, "PVR
Cinemas"),
(2, 2, "Inside Out 2", "2024-11-21", "6:30 PM", 200, "IMAX
Theatres"),
(3, 3, "Kalki-2898 AD", "2024-11-22", "1:00 PM", 180, "Miraj
Cinemas"),
(4, 4, "Avatar", "2024-11-23", "5:00 PM", 220, "Metro Junction"),
(5, 5, "Crew", "2024-11-24", "8:00 PM", 250, "PVR Cinemas")
]

# Insert data into showtimes


mycursor.executemany("""
INSERT INTO showtimes (show_time_id, mv_id, movie_name,
show_date, show_time, tickets, cinema)
VALUES (%s, %s, %s, %s, %s, %s, %s)
""", showtimes_data)

# Commit the transaction


mydb.commit()

print("Showtimes data inserted successfully!")


3.Menu driven code(file3)
import mysql.connector
import random as r
mydb = mysql.connector.connect(host='localhost', user='root',
password='1234')
mycursor=mydb.cursor()

mycursor.execute("USE moviebookingsystem")
mycursor.execute("SELECT * FROM Showtimes")

rows = mycursor.fetchall()
columns = [i[0] for i in mycursor.description]
print(" | ".join(columns))

for row in rows:


print(" | ".join(str(cell) for cell in row))

while True:
print("""1.show details of movie
2.Filter by cinema
3.Booking of movie
4.stop""")
var=int(input("Enter choice 1/2/3/4"))
if var==1:
mv=int(input("Enter movie id"))
query="""SELECT movie_name,plot,cast
FROM movie_listings
Where mv_id=%s"""
mycursor.execute(query,(mv,))
result=mycursor.fetchone()
if result:
print(f"movie name: {result[0]}")
print(f"Plot: {result[1]}")
print(f"Cast: {result[2]}")
else:
print("no movie found!")
elif var==2:
ch=input("enter desired cinema name")
var2="""SELECT *
FROM Showtimes
WHERE Cinema =%s"""
mycursor.execute(var2,(ch,))
res=mycursor.fetchall()
if res:
columns = [i[0] for i in mycursor.description]
print(" | ".join(columns))

for row in res:


print(" | ".join(str(cell) for cell in row))

elif var==3:
u=0
s_id=int(input("Enter showtime id"))
while True:
u=u+1
query1="SELECT * from showtimes where show_time_id=%s"
mycursor.execute(query1,(s_id,))
result1=mycursor.fetchone()
id1=int(result1[5])
l=r.randrange(1,10000000)
n=input("enter your name")
mb=int(input("enter your mobile number"))
ql="""INSERT INTO bookings
(booking_id,show_time_id,name,phone_number,cost)
Values(%s,%s,%s,%s,%s)"""
val=(l,s_id,n,mb,id1)
mycursor.execute(ql,val)
mydb.commit()
ch=input("do you want to continue(y/n)")
if ch=='n':
break
print("record inserted")
elif ch=='y':
pass
else:
print("invalid input")
print(u,"records inserted")
mycursor.execute("SELECT * FROM bookings")
result = mycursor.fetchall()
clmn= ['booking_id', 'showtime_id', 'name', 'phone number',
'ticket']
print("\t".join(clmn))
for row in result:
print("\t".join(str(item) for item in row))
elif var==4:
break
else:
print("invalid input")
mycursor.close()
mydb.close()

Verifying with SQL


mysql> show databases;
mysql> show tables;

mysql> SELECT * from movie_showtimes;


mysql> SELECT * from bookings;
OUTPUT CODE
CONCLUSION

The Movie Ticket Booking System is the integration of Python and


MySQL, which brings a revolution to the theatre's ticket
management system. This system holds great potential since it has
automatic ticket management, hence making operational activities
efficient and minimizing human-related errors. Real-time updates,
data analysis on a comprehensive basis, and secure transactions
make this system quite reliable for cinema owners.

The intuitive graphical user interface makes it easy for customers to


go through the booking process since they can choose movies, time
for shows, and even seats without much struggle. The electronic
system eliminates the use of paper-based methods and hence
improves communication while reducing the possibilities for err in
communication.

This system adjusts to every specific need of the different theatres,


and, because of its flexibility and capabilities for customization, it
merges effortlessly with the current operations. In its totality, this
system boosts efficiency; however, more importantly, it enhances
the customer experience quite noticeably, setting a new standard for
processes in booking movie tickets and drives the future of cinema
management.
BIBLIOGRAPHY

Kips Publication Computer Science with Python (Class 12)


https://www.w3schools.com/python
https://dev.mysql.com/doc/mysql-getting-started/en/
https://www.datacamp.com/tutorial/mysql-python
https://www.mysqltutorial.org/python-mysql/getting-started-mysql-
python-connector/
Thank you

You might also like