You are on page 1of 25

I

"1

ABSTRACT
The railway reservation system facilitates the passengers to enquiry
about the trains available on the basis of source and destination,
booking and cancellation of t ickets, enquiry about the status of the
booked ticket, etc. The aim of case study is to design and develop a
data base maintaining r ecords of different t rains, train status and
passengers. This project conta ins introdu ction to the r ailways
r eservation system. It is the computerized system of reserving the
seats of train seats in advance. It is mainly used for a long route.
Online reservation has made the process for the reservation of seats
very much easier than ever before.
i
I~ In our country India, there are number of counters for the reservation
of the seats and one can easily make reservations and get tickets .

I
I '--
Railway reservation system, has described above, can lead to error
free, secure, reliable and fast management system. It can a ssist the
user to concentrate on then- other activities rather to concentrate on
the record keeping. Thus, it will help organization its bett er
utilization of resources. Administrator of the project, with the h elp of
a password, can enter new train record, display all train records,
modify train r ecords and delete t rain records. The record of train
includes its nu mber, name, source, destination, and days on which it
is available, wherea s record of train status includes dates for which
tickets can be booked, total number of seats available, and number of
seats already booked .

L
L

Page I 1
...i: I
~

l
r ,
l.
\
\. ABSTRACT
The railway reservation system facilitates the passengers to enquiry
\...
about the trains available on the basis of source and destination,
I....
booking and cancellation of tickets, enquiry about the status of the
\.. booked ticket, etc. The aim of case study is to design and develop a
data base maintaining records of different trains, train status and
I__
passengers. This project contains introduction to the railways
\.. 1·eservation system. It is the computerized system of reserving the
'---
seats of train seats in advance. It is mainly used for a long route.
Online reservation has made the process for the reservation of seats
I....
very much easier than ever before.
I...
In our country India, there are number of counters for the reservation
\. of the seats and one can easily make reservations and get tickets.
\.. Railway reservation system, has described above, can lead to error
free; secure, reliable and fast management system. It can assist the
\..
user to concentrate on their other activities rather to concentrate on
'--- the record keeping. Thus, it will help organization its better
\....
utilization of resources. Administrator of the project, with the help of
a password, can enter new train record, display all train records,
\...
modify train records and delete train records. The record of train
\.__ includes its number, name, source, destination, and days on which it
is available, whereas record of train status includes dates for which
\..
tickets can be booked, total number of seats available, and number of
(____
seats already booked.
\....

(_

L
L
L
I
'-
L
L
L
\._,

Page I 1
\ ..
11.
I
'-

l
""11111

'1 J

Cun\l'n h
1. Int roduclion .................................................................................. 3
2. Pu11>0Hc ............... .......................................................................... 4
3. Advantage of this Project ............................................................. 4
4. Data Dictiona1·y ............................................................................ 5
5. Pre·rcqui sites ................................................................................ 6
a. Soft,varc .................................................................................. 6
b. Hardwar e ................................................................................ 6
6. Function table ............................................................................... 7
7. System Design .............................................................................. 8
a. Welcome Page ........................................................................ 8
b. Booking of Ticket ................................................................... 8
'- c. E·Ticket ................................................................................... 11

'- d. Cancella tion of Ticket .......................................................... 12

'-
e. Postpone ment of Ticket .............................. ............................. 13
8. System Design Flow Diagram ............... ............... ...................... 14
'-

9. Conclusion ................................................................................... 15
'-
10. Bibliography ............... ............................................................. 16
\.

'---

.. \..

\..

\..

'-
I...

'-
\..

'-....

I-

I
'-

Page I 2

I
I
l.
-
..
\

,
'
.. ( · J •

C
L
\.

\... 2.Purpose
\.....
The purpose of the source is to describe the railway reservation
system which provides the train timing details, reservation, billing
L
and cancellation on various types of reservation mainly,
L
• Online reservation
\..... • Confirm reservation & e·Tickets
\..... • Cancellation of reservation or postponemen t of reservations

l. Every organization, whether big or small, has challenges to overcome


; and managing the information of ticket, train, customer, seat,
C
payment. Every Railway reservation system has different train
L needs, therefore we designed exclusive employee managemen t
\.... systems that are adopted to your managerial requirement s.

\.....

L
3. Advanta ge of this Project
( .. '
• Security of data.
L • Ensure data accm·acy.
• Proper control of the higher official.
l
• Minimize manual data entry.
'-' • Minimum time needed for the various processing.
L'· • Greater efficiency.
,n
• Better service.
,,i
;,
L

• User friendliness and interactive.
~! L
c.
(_

C
C
i
I: C
Ii
Ii:I L
q
,,,,I! \.....
ii
;,
:• \.....
i: ,- ,.
,." l_,
I•
Page I 4
i'
,: c·
l
4. Data Dictionary

SL No. Variable Name Type Size Description

Departure To store departure


1. char 46
Station location
Destination To store destination
2. char 45 location
Station
3. Train Name String (char) 30 To store train
To store train
4. Train Number Int 2-3 number (must be
unique for each)
To store departure
5. Time Int 2 and reaching time
No of seats To store number of
6. Int 1
seats are booked
booked
No. of seats To store number of
7. Int 1
available seats are available
To store type of
8. Seat type char 3 seat (Bart)
To store cost of per
9. Cost of per seat float 3
seat (in Rs)
To store phone
10. Passenge1·1s log in Int, char 5 number, email id,
password of
--
\.... Name of To store
11. passenger
String - passenger's name
L
To store passenger
\...,. 12. Age Int 1
age
L To store
13. gender Char 2
passenger's gender
(, To store date of
14. Date Int 1
l.__ 15. No. of seats Int To store no of seats
I
L To store extra cost
Extra cost for
when
16. postponement of float 3
L postponement of
ticket
ticket is done
I
C
I
L
I._

( Page I 5
'-
\ ....
5. Pre-requisites
a. Software
SOFTWARE DESCRIPTION
Windows 10 Professional Operating system

IDLE <Python 3.9 64-bit) For checking the algorithm

For tabular representation of


MySQL
database

b. Hardware
HARDWARE DESCRIPTION
Device name Laptop - ODE4SKND

Intel® Core™ I5-1035Gl


(._ Processor
CPU@2.4GHz-2.9 GHz

l
Primary Memory (RAM) 8.00 GB (7. 79 GB usable)
64-bit operating system, x64-
System type
based processor

l.
(_

l
Page I 6

\..
6. Function table
SL
No.
Function Name Type Size Description

1. I>m1tinntion list 8 To store destinati on list


....., Trnin numo string 5 To store train names

3. 1'min No. To store train number


Int 3
(must be unique)

4. To Departu re and arrival


'l'imc float 10
time

5. No. of seats To count the no. of seats


Int 6
available & booked

Seat type and To store seat type with


6. Dictiona ry 10
cost their respectiv e cost
7. Phone number lnput(in t) 2 Must be of 10 characte rs
8. Email id lnput(str ) Should have and '.com'

Should have alphabet ,


9. Passwor d lnput(str ) number, and special
characte r

10. Passeng er name lnput(str ) Should be around


<=50
11. Age lnputGn t) Must be<=4
12. No. of seats lnput(in t)
I

l
l.

Page I 7
7. System Design
In the system design process, the primary objective is to identify user
requiremen ts and to build a system that satisfies these requirements.

a. Welcome Page
In this the customer will get options for what they want to
\_
do like:

1. To Book Ticket
11. For cancelation of tickets
iii. To postponement of Ticket

When they will select option, they need our program will
proceed according to selected option

Welcome to
Railway Reservation System

1. Book Ticket
2. Cancel Ticket
3. Postpone Ticket/ Change Reservation Date
l
ENTER YOURCHOICE

11 I

b. Booking of Ticket
CASE-I · To Book Ticket
First customers will be provided the destination list.
L (The customer needs to select the destination)
e.g.
SL No. From To
l 1. Howrah Delhi
l 2. Delhi Mumbai
3. Guwahati Kolkata

Page I 8

l.

I
'"
I ·~-
I
'
!
i
; '-
'--
,. , I

i:.~-tber= desi-:
I. : Howrah Delhi
be
I
Train List
l. SL
Train name Train Time to Timet.o
No. number Departure Reach
1. Howrah Rajdhani Express 012301 4:50pm 10:05pm
2. Duranto Express 234698 12:30pm 9:00am
3. PurvaExpre ss 817250 10:00am 8:30am
C 4. Superfast Express 102986 6:00pm 12:00
pm

e.g. (Let selected train be)


Sl. Train Timeto Time to
No. Train name
number Departure Reach
l.
1. Howrah Rajdhani Express 012301 4:50pm 10:06pm
l
Howrah Rajdhani Express
Class No. of Seat No.of Seat
Available Booked Available Choose Seat Cost(f)
Upper Class . 10 (10-x) Lower Berth 26,000/·
A/C2 Tire Lower Berth
2 58 (60·x) 10,000/·
Upper Berth 8,000/·
A/C3 Tire Lower Berth 6.000/·
10 90 (100-x) Middle Berth 4,000/·
L Upper Berth 4,000/·

C' e.e. (Let selected seat be)


C Howrah Rajdhani Express
Class No. of Seat No.of Seat Choose
(_ Available Seat Cost(t>
Booked Available
C A/C2Tire 2 58 (60·x) Lower Berth 10,000/·
C
(__

.
.. Page I 9
tL
'' \

1
1 Customer login
(Customer need to log in to create account for booking
ticket.)

'
Welcome to
Railway Reservation System

Phone Number
Your Email
Set Password

'- I t -,,,:· I

'- Ticket booking form



(Customer need to enter the following personal details in
t his page)
\...

'-
Welcome to
\..
Railway Reservation System
'--
Name of Passenger
I....
Age Gender
''-- Date of Journey
\.. Nos. of Seat(z) (y>=z)

~ Per Seat Cost 10,000.00 (r)

Total Ticket Cost [,..Z)


\..

l_
,, ~I

\..
,.._

\.

l
Page I 10
c. E-Ticket
(The e·Ticke t will get genera ted from the above selecte d
and mentio ned details )

~'"-"-'"- M\lf:
KRISH RAJ
I'\... 12301 IRAJDHANI EXP COA..">4 8-4
f lO(l',I HOWRAH !HWH) <t•T 16
TO NEW DELHI (NDLS) OPAAT 16:$0

__________________.....,._____
25 OCT 2022 10.05
I)<"!, AAOM

Then the Ticket bookin g form page will open where the
custom er can only be able to change the date or person al
details .

Welcome to
Railway Reservation System

Name of Passenger ICRISH RAJ GUPTA

Age 16 Gender MALE


Date of Journey __/__/2 0_

Nos. of Seat(z) (y> =:i:)


Per Seat Cost 10,000.00 (r)
Date Change Surcharge (a)

Total Ticket Cost (r":i:) +(a)

Amount Payable (a)

Page I 11
Thon thl' c·ticko t will get will be genera ted after payme nt
of oxtrn charge s

Jm/;1111 Raih:i,q•s
MS\ANvtANA Mt

KRISH RAJ
11"1N 12301 /RAJDHANI EXP COACII 8-4
fMOM HOWRAH (HWH) \f.AT 16
m NEW DELHI (NDLS) DfPART 16:50
OATt 25 OCT 2022 AARM 10:05

d. Cancellation of Ticket
CASE·II
For cancellation of ticket
In this page custom er need to provide the following details
to cancel their confirm ticket

Welcome to
Railway Reservation System
RESERVATION CANCELATION

Enter Ticket No
Phone Number
Your Email
Enter Password

Then 2/ a part of the amoun t of ticket will get refund ed in


L
the accoun t throug h which the payme nt was made.

Page I 12
\

e. Postponement of Ticket
CASE-ID
To Postponement of Ticket
In this page again customer need to provide the following
to change the date of confirm Ticket.

Welcome to
Railway Reservation System
POSTPONE TICKET/ DATE CHANGE

Enter Ticket No
New Date of Travel . I

l
Your Email
Enter Password

l f
I
P.

I
I

[
[
I
Page I 13
8. System Design Flow Diagram
'

'

L
(

C
l.
L

Page I 14
\...

'-
:r
, I

'-
I... 9. Conclusion
\. The main of developing reservation system is to provide all
information that is required by the users. User friendliness is a must
\...
that is the user must gel the details without complicated searching
\.. procedures Other important requirements of software are:

' • Data security


I._ • Extensibility
• Maintainabil ity
I._
• Flexibility
\
• User Friendly

''-

\..

\..

\..

I
'-

''-·

'-
~

l.
L
L
L
l,

l
L
\..

\..
i.... Page I 15
a.
\.
,

10. Bibliography
• https://github.com/krishraj·gupta/rrs·python
• https;//www.google.com
• https://en.wikipedia.org
• Sumita Arora Computer Science book

\_

l
'--

"-
I
I.

\..

l
(
'-

\....

"-
l.....

l.....

L
L
L
(._

l.
I....

\.
(._ Page I 16

II~
Content

1. Source Code
2. Outputs
3. Bibliography

- . ~--- - --- ·- .. -· - --- .. -- ,... ' --


SOURCE CODE

FILE N~!f.. : TADUS

import mysq l. comwc tor

mycon .. mysq 1. connt'l. tor. c:0111wc t (hos t • 1 localhost 1 , user• '

root' ,passwd• 'manager')


cursor•mycon.cursor ()

mycon.autocommitsTrue

sl•»create database railway"

cursor . execute(s1)

sl=''create table railway (name varchar (100), phno

varchar (15) primary key, age int (4), gender

varchar (50), from _f varchar (100), to_t

varchar (100), date_d varchar (20} )' '

cursor. Execute (s1)

s1=' ' create table user accounts (fname

varchar (100), lname varchar (100) , user_name

varchar (100) , password varchar (100 ) primary

key, phno varchar (15), gender

varchar (50), dob varchar (50) , age

varchar (4) )"

cursor.execute (sl)

FILE NAME : MAIN


def menu() :
print ( '1. YES')
print ( '2. NO')
ch=int(input('DO YOU WANT TO CONTINUE OR NOT: '))
while ch==1
print ('WELCOME TO ONLINE RAILWAY RESERVATION
SYSTEM')
print ('1. SIGN IN')
print ('2. SIGN UP')
print ('3. DELETE ACCOUNT')
print ('4. EXIT')
chl=int(input('ENTER YOUR CHOICE: '))
if ch1==1:
a=checking()
if a==True:
print('WELCOME')
main()
else:
continue

elif ch1==2:
a=checking_l ()

if a==True:
main()
else:

print ('PASSWORD ALREADYEXISTS')


continue
elif ch1==3:

c=checking_2 ()
if C==True:
1
IF CHOICE IS (TICK ET BOOKING)
ente r ur choi ce : 1
ente r your nam e:vin u kant h
· ente r your phon e numb er:97 8788 3628
ente r your age: 16
t-1.=M ALE
F=FE MALE
N NOT TO MENT ION
ente r your gend er:m
ente r ur star ting poin t : chen nai
ente r your dest inat ion. : mad urai
ente r date (dd) :23
ente r mont h(mm ) : 04
ente r year (yyy y) :2 020
BOOK ED SUCC ESSF ULLY
1 . TICK ET BOOK ING
2 . TICK ET CHEC KING
3.TIC KET CANC ELLIN G
4 . ACCO UNT DETA ILS
5.LO G OUT
ente r ur choi ce :
IF CHOICE IS .2(TIC KET CHECKING)

:ent er ur choi ce:2


· 1.ye s
2.no
·cto you want to cont inue or not: 1
: en.te r your phno ne num ber: 9787 8836 28
. NArv:t:E : : : : VIN'"u KANT H
PHONE NUM BER :::: 9787 8836 28
: AGE : : : : 16
GENDER : : : : :MALE
· STA..~TING POIN T : : : : CHE~INAI
:DES TINA TION :::: MADURAI
DATE : : : : 23/0 4/20 20
l.TIC KET BOOK ING
2 . TICK ET CHEC _KING
3.TIC KET CANC ELLI NG
4 . ACCOUNT DETA ILS
5.LO G OUT
: ente r ur choi ce : 1·
IF CHOICE IS 2 (SIGN UP WINDOW)

L~ . . _.. ··:,,·,. :!.:.. ·'.:-: .: ~·::.__ · _'; ~: .'.: .·,}_.-·_:;: \1.t/L/{:f;:£i)i/f/\.ti(/:."f;-;f:~,-~:~\ :;f
F_ile, Edit Shell De,bu~ Op_t ion e. \ol/in _d o~ - ___1-iel_~ ...

! ENTER YOUR CHOICE:2


, FIRST NAME:v-inu.
: LAST NAI--1E:kanth
:usER NAME:v-inu. kanth
PASS WORD:v-inu.1 234
RE-ENTER YOUR PASS WORD:v-inu1 234
. PHONE NUMBER:978 7883628
:tvl=MAI...E
F=FEMALE
N-NOT TO ~NTION
ENTER YOUR GENDER:m
. ENTER YOR DATE OF BIRTH
DD:23
-~ : 04
YYYY:2004
· yoUR AGE: 16
. v-JELCO.ME v-inu ka.nth
_1 . y e s
· 2 .no
do you want to continue o r not:1
1.TICRET BOOKING
2.TICI-CET CHECKING
3.TIC:KET CANCELLING
4.ACCOUNT DETAILS
S.LOG OUT
'. e n t e r u r choice:
IF CHOICE IS 3 (TICKET CANCELLING)
-ente r ur choic e:3
. 1.yes
. 2. ntj
do you want to conti nue or not:1
·ente r your phone numb er:978 78836 28
TICKE T CANCELLED
1 . TICKE T BOOKI NG
2.TIC KET CHECK ING
3.TIC KET CANCE LLING
4 . ACCOUNT DETA ILS
5.LOG OUT
·ente r ur choic e :

IF CHOICE IS ~~f;(.ACCOUNT DETAILS)


· enter ~r c ho i c e : 4
USER ::t-l'A:t4 E : -v--i:n..-u. Jca..:n. t h
, PASS WORD : v-.irt u.12 3 4
. FIR.S T N ~ · VI NU
. LAST N ~ : : : KANT I-I
PHON E NL~ER : :: 9787 8836 28
· GEND ER. : : : MALE
: DAT E OF BIR.T H · 23/04/2004
· AGE : : : 1..6
1 . TICK ET BOOK ING
2 . TICK E T CHEC KING
3.TIC KET CANC ELL I NG
4 . ACCO UNT DETA IL S
. S.LO G OUT
'. e n t e r ~ r c h o i ce :
IF CIIOICE JS ,1J(EXITJ

«-.1 • 1~:x :r: .. r


l•:!N ..I'E~l ~ You -1-~ CII OIC J~: 4
'T'l lAN l,. YO U
>> > I

..
IF CHO ICE IS : i

ENTER YOUR CHO ICE :56


ERR OR 404 : PAG E NOT FOlJ ND
>>> I

SECOND CHO ICE LIST AFTE R LOG IN


WELC OME
1. . yes
2.no
do you wan t to con tinu e or not: 1
1 . TICK ET BOO KING
2. TICK ET CHEC I<ING
3.TIC I<ET CAN CELL ING
4.AC COU NT DET AILS
s. LOG ou·r
ente r ur cho ice :j
OUTPUT

CHOICE WINDOW
l.YES
,2 .NO
DO YOU WANT TO CONTINUE OR NOT:l
WELECOME TO ONLINE RAILWAY RESERVATION SYSTEM
l.SIGN IN
2.SIGN UP
3.DELETE ACCOUNT
4.EXIT
ENTER YOUR CHOICE:

IF CHOICE JS tj' (.LOGIN WINDOW)

1.YES
2.NO
DO YOU WANT TO CONTINUE OR NOT:1
WELECOME TO ONLINE RAILWAY RESERVATION SYSTEM
l.SIGN IN
2.SIGN UP
3.DELETE ACCOUNT
4.EXIT
·ENTER YOUR CHOICE:1
USER NAME:vinu kanth
PASS WORD:vinu1234
HII vinu kanth
WELCOME
:1.yes
·: 2 .no
do you want to continu e or not:

You might also like