CS Project 2024 25
CS Project 2024 25
2024-25
PROJECT TOPIC :
RAILWAY RESERVATION SYSTEM
Submitted By:
Name: Piyush Raj
Class: XII-B
Board roll no:
Submitted To:
Dr Indrajeet Kumar,
PGT(CS)
1|Page
CERTIFICATE
This is to certify that Piyush Raj of class: XII B of
KENDRIYA VIDYALAYA KANKARBAGH has done his
project on RAILWAY RESERVATION SYSTEM under
my supervision. He has taken interest and has
shown at most sincerity in completion of this
project.
I certify this project up to my expectation &
as per guidelines issued by CBSE, NEW DELHI.
PRINCIPAL
2|Page
ACKNOWLEDGMENT
It is with pleasure that I acknowledge my sincere
gratitude to our teacher, Dr. Indrajeet Kumar
who taught and undertook the responsibility of
teaching the subject computer science. I have
been greatly benefited from his classes.
I am especially indebted to our Principal MR. M.P
Singh who has always been a source of
encouragement and support and without whose
inspiration this project would not have been a
successful I would like to place on record heartfelt
thanks to him.
Finally, I would like to express my sincere
appreciation for all the other students in my
batch their friend & the fine time that we all
shared together.
3|Page
HARDWARES AND SOFTWARES
REQUIRED
HARDWARES
1. Desktop / Laptop
2. Mobile Phone
SOFTWARES
4|Page
CONTENTS
S.No. Topic Page No.
1 Certificate 2
2 Acknowledgement 3
4 Introduction 6
6 MySQL Database 22
5|Page
7 Outputs 25
8 References 30
INTRODUCTION
The project RAILWAY RESERVATION SYSTEM
Objectives of the Project
1. Administrative Empowerment:The core objectives of our
project are multi-faceted, addressing the intricate needs of
both administrators and passengers within the railway
ecosystem.
Administrative Functions
The Admin Panel, a focal point of the system, equips
administrators with indispensable tools:
6|Page
7|Page
name, origin, destination, journey distance, journey time,
seat availability, and fares.
Update Train Details: The system allows administrators to
modify existing train details, adapting to dynamic demands
and operational changes. This includes updating seat
availability, journey details, and fare information.
Cancel Train: In response to operational constraints or changing
demands, administrators have the authority to cancel trains,
ensuring flexibility and adaptability in the system.
User Interaction
User Login: The system provides a secure login interface for
registered users, requiring user ID and password for access.
Forgot User ID: Users can retrieve forgotten user IDs
through their registered email addresses, enhancing user
experience and reducing barriers to access.
Forgot User ID
The `forgot_user_id()` function provides a mechanism for
users to retrieve their registered user IDs via email
verification, ensuring a smooth user experience.
9|Page
Admin Password Verification
The `adminpassword()` function implements a secure
password system for accessing the admin panel, ensuring
restricted access and system security.
Train Search
The `Train_Search()` function allows users to search for
trains based on origin and destination, providing detailed
information about available trains.
Book Tickets
The `Book_Ticket(uid)` function simulates the ticket booking
process, allowing users to select trains, classes, and
passengers for reservation.
10 | P a g e
Cancel Tickets
The `Cancel_Ticket()` function facilitates the cancellation of
booked tickets, showcasing the system's ability to handle
modifications to user bookings.
11 | P a g e
PyTHON 1.
SOURCE CODE:
import mysql.connector as a
if 'myrailway' in dl2:
sql = "use myrailway"
c.execute(sql)
else: # CREATE DATABASE IF NOT EXISTS
sql1 = "create database myrailway"
c.execute(sql1)
sql2 = "use myrailway"
c.execute(sql2)
sql3 = """create table Train(Name varchar(50), Cost integer, Distance integer, Date
varchar(30))"""
c.execute(sql3)
sql4 = """create table Customer(Name varchar(20), Train varchar(25), Payment integer, Date
varchar(20), Phone varchar(20))"""
c.execute(sql4)
sql5 = """create table Bills(Detail varchar(20), Cost integer, Date varchar(20))"""
c.execute(sql5)
sql6 = """create table worker(Name varchar(100), Work varchar(20), Salary varchar(20))"""
c.execute(sql6)
con.commit()
""")
choice = input("Select Option: ")
while True:
if choice == '1':
AddTrain()
elif choice == '2':
BookTrain()
elif choice == '3':
AddBill()
elif choice == '4':
AddWorker()
elif choice == '5':
dTrain()
elif choice == '6':
dPayments()
elif choice == '7':
dBills()
elif choice == '8':
dWorker()
else:
print("Enter Again...")
options()
signin()
16 | P a g e
MySQl
DATAbASE:
:
TRAIN TABLE
PASSENGER LIST :
17 | P a g e
USER DETAILS :
BOOKED_TICKETS:
18 | P a g e
OUTPUTS:
19 | P a g e
TRAIN RESERvATION MAIN PAgE:
20 | P a g e
THE ADMIN lOgIN PANEl:
CANCEl TICKET:
21 | P a g e
bOOKINg TICKETS :
22 | P a g e
SEARCH TRAIN:
23 | P a g e
REFERENCES:
1. CLASS 11th& 12th Computer
Science Book
(SUMITA ARORA)
2.PYTHON https://www.python.org/
3.MySQL https://www.mysql.com/
4.KV Coders https://kvcoders.in
79874: 5. IRCTC:
https://www.irctc.co.in/nget/ train-
search
24 | P a g e