0 ratings0% found this document useful (0 votes) 52 views16 pagesCs Train Reservation System
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
SN
—_———
————— EE
——_—_—_—_—S===—=
are] sre
freien
KENDRIYA VIDYALAYA NO.1 SECTOR-30
GANDHINAGAR
PROJECT ON TRAIN RESERVATION SYSTEM
SUBMITTED BY
11608908 §ANUSHREE KUWARBA CHAVDA
11608909 = APEKSHA KUMARI CHAVDA
11608931 | RAJESHWARI BA VAGHELA
Under the Guidance of:
MR. AK MEENA SIRCONTENTS
1, Introduction ste
2, Objective & Scope of the Project-~
3. Theoretical Background:
4. System Implementation —~
4.1 The Hardware used
4.2 The Softwares used:
5. System Design & Development—
5.1 Database Design.
5.21/0 Forms Design & Event Coding:~
6. User Manual-
6.1 How to install: —---——-~
6.2 Working with Software:
7. References ————-—--—INTRODUCTION
This software project is developed to automate the functionalities of Trains. The purpose of
the software project is to develop a program which provides a friendly interface for the
Higher Autharity to manage the accounts of passangers and to know their Information.
When this program made to work by most Passengers then it ean be prove to be an ultimate
way of usage for them
AMIS mainly consists of a computerized database, a collection of inter-related tables for a
particular subject or purpose, capable to produce different reports relevant to the user. An
application program is tied with the database for easy access and interface to the database.
Using Application program or front-end, we can store, retrieve and manage all information in
proper way.
This software, being simple in design and working, does not require much of training to
officers but controlled fully by a tyro officer, and can be used as @ powerful tool for the Train
Reservation.
During coding and design of the software Project, python a powerful front-end too! is used
for getting CUI based integrated platform and coding simplicity. As @ back-end a powerful,
‘open source RDBMS, My SQL is used as per requirement of the CBSE curriculum of
Informatics Practices Course.
Objective & Scope of the ProjectT he objective of the software project is to develop the functions of Trains, This
software project is also aimed to enhance the current record keeping system,
Which will help managers to retrieve the up-to-date Information at right time in right
shape.
The proposed software system is expected to do the Following functionality-
To provide a user frienclly
The proposed system should maintain all the records and transactions, and should
generate the required reports and information when required
To provide graphical and user-friendly interface to interact with a centralized database
based on client-server architecture.
To identify the critical operation procedure and possibilities of simplification using
modern [T tools and practices.
In its current scope, the software enables Officer to retrieve and update the Information from
centralized database designed with MySQL . This software does not require much training
time of the users due to limited functionality and simplicity,
Despite of the best effort of the developer, the following limitations and functional
boundaries are visible, which limits the scope of this application software.
1. This Software can storé records and produce reports in pre-designed format in soft
copy. There is no facility yet to praduce customized reports, Only specified reports are
covered,
There Is no provision to calculate fine or penalty etc. for defaulter members; however
it. can be developed easily with the help of adding modules.
Some application areas like Updation along with Intrest of Money, Taking of Loan ete.
are not implemented in the project. This project is made by keeping in mind that it is
to be used only by Officers, which can facilitate ease control
So far as future scope of the project is concerned, firstly it is open to any modular expansion
i.e. other modules or functions can be designed and embedded to handle the Officer need in
future. Any part of the software and reports can be modified independently without much
effort.Theoretical Background
What is Database?
Introduction and Concepts:
A database |s a collection of information related to a particular subject or purpose, such as
tracking customer orders or maintaining a product collection. Using any RDBMS application
software like MS SOL Server, MySQL, Oracle, Sybase ete, you can manage all your
information from a single database file. Within the file, divide your data into separate storage
containers called tables. You may and retrieve the data using queries.
A table is a collection of data about a specific topic, such as products or suppliers, Using a
separate table for each topic means you can store that data only once, which makes your
database mote efficient and reduces data-entry errors. Table organises data into columns
(called fields) and rows (called records).
A Primary key is one or more fields whose value or values uniquely identify each record ina
table. Ina relationship, a primary Key is used to refer to specific record in one table from
another table. A primary key is called Foreign key when it is referred to from another table.
To find and retrieve just the data that meets conditions you specify, including data from
multiple tables, create a query. A query can also update or delete multiple records at the
same time, and perform built-in or custom calculations on your data.
rarer one rinegen custores mn Landon
cera were required ny Ape
Role of RDBMS Application Program:
Acomputer database works as a electronic filing system, which has a large number of ways
of cross-referencing, and this allows the user many different ways in which to reorganize
and retrieve data. A database can handle business inventory, accounting and filing and use
the information in its files to prepare summaries, estimates and other reports. The
management of data in a database system is cone by means of a general-purpose software
package called a Database Management System (DBMS), Some commercially available
OBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and Sybase. A database
management system, therefore, is a combination of hardware and software that can be used
to set up and monitor a database, and can manage the updating and retrieval of database
that has been stored in it. Most of the database management systems have the followingcapabilities:
¢ Creating of a table, addition, deletion, modification of records.
4 Retrieving data collectively or selectively,
The data stored can be sorted or indexed at the User's discretion and direction,
Various reports can be produced from the system. These may be either standardized
report or that may be specifically generated according to specific user definition
Mathematical functions ean be perfarmed and the data stored in the database can be
manipulated with these functions to perform the desired calculations,
To maintain data integrity and database use.
The DBMS interprets and processes users’ requests to retrieve information from a database,
In most cases, a query request will have to penetrate several layers of software in the DBMS.
and operating system before the physical database can be accessed. The DBMS responds
to a query by invoking the appropriate subprograms, each of which performs its special
function to Interpret the query, or to locate the desired data in the database and present it in
the desired order,
What is My SQL ? MySQl
The management of data in a database system Is done by means of a general-purpose
software package called a Database Management System (DBMS), Some commercially
available RDBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and Sybase,
MySQL, the most popular Open Source SQL database management system, is developed,
distributed, and supported by Oracle Corporation. MySQL is named after co-founder Monty
Widenius’s daughter, My, The name of the MySQL Dolphin (our lago) is “Sakila,”
+ MySQL is a database management system.
‘A database is a structured collection of data, it may. be anything from a simple
shopping list to a picture gallery or the vast amounts of information in a corporate
network. To add, access, ancl pracess data stored in a computer database, youneed a
database management system such as MySQL Server. Since computers are very
good at handling large amounts of data, database management systems play a
central role in computing, as standalone utilities, or as parts of other apptications.
MySQL is based on SQL
A relational database stores data in separate tables rather than putting all the data in
one big storeroom, This adds speed and flexibility. The SQL part of “MySQL” stands
for “Structured Query Language.” SQL is the most common standardized language
used to access databases and |s defined by the ANSI/ISO SQL Standard. The SOL
standard has been evolving since 1986 anc several versions exist, In this manual,
*SQL-92" refers to the standard released in 1992, "SQL-1999" refers to the standard
feleased in 1999, and "SQL:2003" refers to the current version of the standard,
MySQL software is Open Source,
Open Source means that it Is possible for anyone to use and modify the software.
Anybody can download the MySQL software from the Intemet and use it withoutpaying anything. If you wish, you may study the source code and change it to suit your
needs, The MySQL software uses the GPL (GNU General Public License),
The MySQL Database Server is very fast, reliable, and easy to use.
if that is what you are looking for, you should give it a try. MySQL Server also has a
practical set of features developed in close cooperation with our users. You can finda
performance comparison of MySQL Server with other database managers on our
benchmark page. MySQL Server was originally developed to handie large databases
much faster than existing solutions and has been successfully used in highly
demanding production environments for several years. Although under constant
development, MySQL Server today offers @ rich and useful set of functions. Its
connectivity, speed, and security make MySQL Server highly suited for accessing
databases on the Internet,
MySQL Server works in client/server or embedded systems.
The MySQL Database Software is a client/server system that consists of a rmulti-
threaded SQL server that supports different backends, several different client
programs and libraries, administrative tools, and a wide range of application
programming interfaces (APIs).
The Main Features of MySQL
Written in © and C++.
Works on many different platforms.
Uses multHayered server design with independent modules.
Provides transactional and nontransactional storage engines,
Designed to make it relatively easy to add other storage engines. This |s useful if you
want to provide an SQL interface for an in-house database.
Uses a very fast threac-based memory allocation system
Executes very fast joins using an optimized nested-loop join.
implements SQL functions using a highly optimized class library that should be as.
fast as possible, Usually there is no memory allocation at all after query initialization.
Provides the server as a separate program for use in a client/server networked
environment, and as a library that can be embedded (linked) into standalone
applications Such applications can be used in isolation or in environments where no
network is available.
Password security by encryption of all password traffic when you connect toa server.
‘Support for large databases. We use MySQL Server with databases that contain 50
million records. We also know of users who use MySQL Server with 200,000 tables
and about 5,000,000,000 rows.
MySQL client programs can be written in many languages. A client library written in ©
is available for clients written in C or C++, or for any language that provides C bindings.
APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available, enabling
MySQL clients to be written in many languages,
The Connector/ODBC (MyODBC) interface provides MySQL support for client
programs that use ODBC (Open Database Connectivity) connections.
The Connector/J interface provides MySQL support for Java client programs that use
JDBC comnennens, Clients can be run on Windows or Unix. Connector/J source is
available.System Implementation
The Hardware used:
‘While developing the system, the used hardware are:
PC with Pentium Dual Gore processor having 2.00 GB RAM, SVGA and other required
devices.
The Softwares used:
> Microsoft Windows® 7 as Operating System.
> Python 3,7 as Front-end Development environment.
>» MySQL as Back-end Sever with Database for Testing,
>» MS-Word 2007 for documentation.System Design & Development
Database Design:
An important aspect of system design is the design of data storage structure. To’ begin with
a logical model of data structure is developed first. A database is a container object which
contains tables, queries, reports and clata validation policies enforcement rules or contraints
etc. A logical data often represented as a records are kept in different tables after reducing
anomalies and redundancies. The goodness of data base design lies in the table structure
and its relationship.
This software project maintains @ database named Banks which contains the following
tables.
Tables
Inmy awesome and amizing software of banks | have created to tables to make the software user
friendly and to make it different from others, Tables are shown below
This project consists a table with table name pyreservation
Pyreservation
Ri
Sip
ein
tation | varchar<: NULL
cor a chaProject View
ay
K-Aligadh Jn
Sereno
ae
Oia
oa
Nicaea
(oat
HiGa aan}ervation is Suc ae Ream oct)
ation
Tat nea a)
ci
your choice:3
elite
Dadri
ra
Reservation
lay recordPYTHON CODING
#SOURCE CODE FOR TRAIN RESERVATION SYSTEM
print ‘Welcome To Vanda Bharat Resevtion Platform**
print("****Made By Nishant Gupta****")
#icreating database
import mysql.connector
mydb=mysql.connector,connect(host="localhost",user="root",passw
d=" computer")
mycursor=mydb.cursor()
mycursor.execute("create database if not exists pyreservation")
mycursor.execute("use pyreservation’)
#ereating required tables
mycursor.execute(“create table if not exists pyreservation(name
varchar(25) not null,age varchar(25) not null,gender char(1) not
null,station varchar(25) not null,status varchar(25) not null)")
mydb.commit()
while(True):
print(® ‘ook Reservation")
print(”: ance! Reservation’)
print("3=Display record")
print(’4=Exit")
ch=int(input("Enter your choice:"))
#PROCEDURE FOR reservation
if(ch==1):
name=str(input("Enter Name: “))
age=str(input("Enter Age:"))
gender=str(input("Enter gender(M/F)"))
print("PLease select station you want to go...")
print("1=Gaziabad")
print(*2=Dadri")print(” hurja")
print("4=Aligadh jn")
print("5=Kanpur central")
print("6=Priyagraj jn’)
print("7=Gyanpur road”)
print("8=Bhulanpur")
eh2=int(input("Enter Station: "))
if(ch2==1);
mycursor.execute("insert into pyreservation
yalues(""+name+",""+age+"',""+gender+",""+"Gaziabad"+",""+"reserved"
ony)
mydb.commit()
print("Reservation is successfully created please submit
online specified amount in counter...")
if(ch2==2)
mycursor.execute("insert into pyreservation
yalues(""+name+",""tage+"')""+gender+",""+"Dadri"+",""+"reserved'+")")
mydb.commit()
print('Reservation is successfully created please
submit online specified amount in counter...")
if(ch2==3):
mycursor.execute("insert into pyreservation
values("“+name+",""+age+"’,""+gender+",""+"Khurja"+","+"reserved’+")
mydb.commit()
print("Reservation is successfully created please
submit online specified amount in counter...")
if(ch2==4);
mycursor.execute("insert into pyreservation
values(‘“+name+",""tage+"','"+gender+",""+"Aligadh
jn’+","+"reserved"+")")
mydb.commit()
print("Reservation is successfully created please
submit online specified amount in counter...")mycursor,execute("insert into pyreservation
values(""+name+",""+age+",""+gender+"""+" Kanpur
central'+"''"+"reserved'+")")
mydb.commit()
print(’Reservation is successfully createdplease submit
online specified amount in counter...")
if(ch2==6):
mycursor.execute("insert into pyreservation
values("+name+","+tage+",""+gender+"',"+"Priyagraj
jn'+"',"+"reserved"+")")
mydb.commit()
print("Reservation is successfully created please
submit online specified amount in counter...")
if(ch2==7):
mycursor.execute("insert into pyreservation
values(""+name+"',""+age+"!'"+gender+"',""+"Gyanpur'+",""+"reserved"+
"s)
mydb.commit()
print("Reservation is successfully created please
submit online specified amount in counter...")
if(ch2==8):
mycursor.execute("insert into pyreservation
values('"+name+"',""+age+",'"+gender+"',""+"Bhulanpur"+"',""+"reserved.
sy!)
mydb.commit()
print("Reservation is successfully created please
submit online specified amount in counter...")
#PROCEDURE FOR CAncelation of reservation
elif(ch==2):
name=str(input("Enter Name: "))
age=str(input("Enter Age"))
mycursor.execute("delete from pyreservation wherename=""+name+"' and age=""+age+"'")
mydb.commit()
print("Your Record of Reservation is Successfully Deleted")
#PROCEDURE FOR DISPLAYING THE Record of reservation
elif(ch==3):
name=str(input("Enter Name:"))
age=str(input("Enter age"))
mycursor.execute("select * from pyreservation where
name=""+name+"' and age=""+age+"'")
fori in mycursor:
name,age,gender,station,status=i
print(f'name: {name}\n age: {age}\n gender: {gender} \n
station: {station} \n status: {status}")
else:
break
User Manual
How to installSoftware:
Hardware Requirement-
@ Intel Pentium/Celeron or similar processor based PC at Client/Server end.
128 MB RAM and 4GB HDD space (for Database) is desirable.
* Standard I/O devices like Keyboard and Mouse ete.
@ Printer is needed for hard-copy reports.
Local Area Network(LAN) is required for Client-Server Installation
Software Requirement-
+ Windows XP/2007 OS is desirable.
Python must be installed and mysql connector must be installed,
@ MySQL Ver 6.1 with Library Database must be present at machine.References
In order to work on this project titled ~Train Reservstion System, the following books and
literature are refered by me during the various phases of development of the project
(1) The Complete Reference python
by Shildit
(2) MySQL, Black Book
-by Steven Holzner
(2) Understanding SQL
~ Gruber
(3) hip. mysql orgs
(4) Course Book for class XII
(5) Together with Informatics Practices
(6) Various Websites of Discussion Forum and software development activities.
Other than the above-mentioned books, the suggestions and supervision of my teacher and
my class experience also helped me to develop this software project.