Railway Reservation Syatem
Railway Reservation Syatem
Railway Reservation Syatem
PROJECT REPORT
ON
“RAILWAY RESERVATION SYSTEM”
SUBMITTED IN THE PARTIAL FULFILLMENT OF THE REQUIREMENTS
OF
Session (2021-2023)
OF
Session (2021-2023)
Primarily, I would like to thank my faculty members for giving me the opportunity to
fulfill my aspiration. With deep sense and regards, I am obliged to Mr. PUNIT KUMAR
SHARMA , Project Guide and project coordinator, as he had a direct influence, some
way, in my motivation and gratefulness for being part of the responsible project guide of
the institute. I am very thankful to him for his valuable guidance and remarkable patience
I wish to thank my parents for their constant encouragement which is like snow, so after
when it falls and longer when it falls and longer when it dwells upon, the deeper it sinks
in mind.
I will be failing in my mission if I do not thank other people who directly or indirectly
So, my heart full thanks to all friends mainly who supported and encouraged me in
OM GAUTAM
MCA IV SEM
ROLL NO.
2101290140036
CERTIFICATE
The matter embodied in this Project Work has not been submitted earlier for award
and belief.
(Mr. Punit Kumar Sharma) (Mr. Ritin Kumar) (Mrs. Shweta Batra)
Project Guide Head of the Department Director
Date: __/__/____
INDEX
1. INTRODUCTION……………………….…………………… 1-7
6. REFRENCES …………………………………………………… 98
INTRODUCTION
This project introduces railway reservation system. It explains how reservation is being
done in Indian Railways. The step by step procedure is explained. This project is
developed in java language. Almost all the header files have been used in this project.
Proper comments have been given at desired locations to make the project user friendly.
Various functions and structures are used to make a complete use of this language. Thos
project is well versed with the programming. Railway reservation can easily accompanied
systems were nationalized as one unit, the Indian Railways, becoming one of the largest
assigned codes identifying their gauge, kind of power and type of operation. Its
operations cover twenty eight states and seven union territories and also provide limited
as the Indian Railways runs about 10,000 trains daily. As of 31 March 2013, 23,541 km
(14,628 mi) (36%) of the total 65,000 km (40,000 mi) km route length was electrified.
[4] Since 1960, almost all electrified sections on IR use 25,000 Volt AC traction through
Our Project: This system is basically concerned with the reservation and cancellation of
railway tickets to the passengers. The need of this system arose because as is the known
fact that India has the largest railway network in the whole of the world and to handle it
manually is quite a tough job. By computerizing it, we will be able to overcome many of
its limitations and will be able to make it more efficient. The handling of data and records
for such a vast system is a very complex task if done manually but it can be made much
To be more specific, our system is limited in such a way that a train starting from a
RESERVATION MANAGEMENT
FARE MANAGEMENT
TIMETABLE MANAGEMENT
These functions will be handled with the help of following sub functions: -
It reserves and cancels seats for the passenger.
OBJECTIVE:-
To reduce paperwork.
Fast Process.
Data security.
human handled chance of error. This project will be used by three types of users
i. Railway Administrator
iii. Passengers
MODIFICATION AND IMPROVEMENT OVER THE EXISTING
IMPLEMENTATION
Present State:-
User has to wait for a long time in the queue to get the reservation.
systems.
reservation counters for reservation and by passenger for search for trains from a
SCOPE:-
This project has a large scope as it has the following features which help in making it
human handled chance of error. This project is used by three types of users
SIGNIFICANCE OF PROJECT:-
Hardware requirements:-
Software Requirements:-
specify the requirements for a new project with any accuracy. Several questions should
It takes considerable skill to determine the true cause of a system problem. A systems
analyst might begin to define the problem by determining if the problem can be classified
ac-cording to one or more common types of systems problems. With knowledge of the
common types of systems problems, the analyst can diagnose a problem by examining its
characteristics.
Organizations usually face problems or have opportunity due to the following facts:
After identification of the problem, it is defined and a general direction or method for
solving this problem is also determined. The management establishes the term of
reference as well as the resources to be provided for the project. System development is
an iterative process and the first identifiable stage of it is problem definition, whose final
and result from one month to the next. Some items it gives good output, but
3. Problem of timeliness: In the current system the reports and output produced is
mostly late and in most of the cases it is useless because it is not on time.
5. Problem of economy: The current system is very costly. We have to spend lots of
money in manual filing, calculations and remembering the information, but still
also. The workload is too much. Few peoples cannot handle all the working.
This phase formally defines the detailed functional user requirements using high-level
requirements identified in the Initiation, System Concept, and Planning phases. It also
maintainability requirements for the system. The requirements are defined in this phase to
a level of detail sufficient for systems design to proceed. They need to be measurable,
testable, and relate to the business need or opportunity identified in the Initiation Phase.
The requirements that will be used to determine acceptance of the system are captured in
what information drives the business process, what information is generated, who
generates it, where does the information go, and who processes it),
3· Develop detailed data and process models (system inputs, outputs, and the process. ·
Develop the test and evaluation requirements that will be used to determine acceptable
system performance.
FEASIBILITY:-
feasible. A proposal summarizing the thinking of the analyst is presented to the user for
review. When approved, the proposal initiates feasibility study that describes and
evaluates candidate systems and provides for the selection of best system that meets
development. First a project team is formed. The team develops system flowcharts that
system, weigh system performance and cost data and select the best candidate system for
INTRODUCTION:-
system.
SUMMARY:
1. A feasibility study is conducted to select the best system that meets performance
systems, and the selection of the best system for the job.
description of outputs define a system’s required performance. The analyst is then ready
3. Three key considerations are involved in feasibility analysis: economic, technical and
behavioral.
STATEMENT OF CONSTRAINTS
Constraints are factors that limit the solution of a problem. Some constraints are
Once the constraints are spelled out, the analyst proceeds to identify the system’s specific
performance objectives. They are derived from the general objectives specified in the
project directive at the end of the initial investigation. The steps are to state the system’s
DESCRIPTION OF OUTPUTS
A final step in system performance definition is describing the output required by the
user. An actual sketch of the format and contents of the reports as well as a specification
of the media used, their frequency, size and numbers of copies required are prepared at
this point
FEASIBILITY CONSIDERATIONS
1. Legal Feasibility: Determines whether the proposed system conflicts with legal
requirements, e.g. a data processing system must comply with the local Data Protection
Acts.
system solves the problems, and takes advantage of the opportunities identified during
scope definition and how it satisfies the requirements identified in the requirements
requirements identified during the initiation and planning phases into unified design
specifications that developers use to script programs during the development phase.
Program designs are constructed in various ways. Using a top-down approach, designers
first identify and link major program components and interfaces, then expand design
layouts as they identify and link smaller subsystems and connections. Using a bottom-up
approach, designers first identify and link minor program components and interfaces,
then expand design layouts as they identify and link larger systems and connections.
Contemporary design techniques often use prototyping tools that build mock-up designs
of items such as application screens, database layouts, and system architectures. End
review and refine the prototyped designs in an iterative process until they agree on an
acceptable design. Audit, security, and quality assurance personnel should be involved in
the review and approval process. During this phase, the system is designed to satisfy the
functional requirements identified in the previous phase. Since problems in the design
phase could be very expensive to solve in the later stage of the software development, a
variety of elements are considered in the design to mitigate risk. These include: ·
The level 0 DFD or a context model represents the entire software element as a single
bubble with input and output data indicated by incoming and outgoing arrows,
respectively.
In level 0 diagram shown below, the passenger fills either the reservation or cancellation
form as input. He gets the ticket as the output and the report is sent to the administration.
Paid Details
functionalities. In this, the single bubble of level 0 DFD is refined furthur . Each of the
processes depicted at level 1 is a subfunction of the overall system depicted in the context
model.
As shown in the DFD above, the passenger either enquires about the trains or goes
directly for the reservation or the cancellation processes as a result of which he gets the
The level 2 DFD is the further refinement of the level 1 DFD. As shown in the DFD
above the passenger has many options like he can directly go to the reservation
counter or can first inquire and then go to the reservation counter or he can just
inquire and return back. If the passenger wants reservation then the seats are checked
for availability and if the seats are available the confirmation ticket is generated
graphically. It shows the relationship between different entities. The entities can have
composite, multivolume or derived attributes. The entities and their attributes are: -
1 Passenger
#. Name
*. First name
*. Middle name
*. Last name
#. Gender
#. Address
#. Age
#. Phone no.
2 Form
#. Form no.
3 Ticket
#. Ticket no.
*. Waiting
*. Confirmed
*. Cancelled
4 Reservation counter
5 Administrator
6 Train
#. Train no
#. Train name
#. Source
#. Destination
7 Seat
#. Seat no.
#. Compartment no.
Symbols Meanings
Data flow
Process
Data store
Entity
Has a
FLOW CHART:-
The program flowchart shows how the system proceeds from the input form to the output
form of the system. It explains how the system is actually processed step by step .It
1. Input flow chart: This flowchart depicts the basic input operations in the system. In
railway reservation system, first of all the password is checked then if the password is
valid then we process the input form if the data is valid then the entries are updated in the
2. Output flow chart: This flowchart depicts the basic output operations in the system.
The user is required to enter the criteria for output. If it is for the reservation then the
availability of seats is checked. If the seats are available then the confirmed ticket is
generated otherwise the user is asked for waiting and if he wants then waiting ticket is
generated. If the user wants the seat to be cancelled it is done and the cancelled ticket is
generated for the user. The information about all the above transactions is then
3. Report flow chart: This flowchart depicts the basic operations for the generation of
reports. If the entries from the processed database are valid the concerned reports are
BOOKING/
STATIONS
CLASS DISCOUNTS
Decision Tree:-
Sequence Diagram:-
USECASE Diagram :-
Activity Diagram:-
MODULES AND THEIR DESCRIPTION
Modularization:
Modularization is a technique to divide a software system into multiple discrete and
independently. These modules may work as basic constructs for the entire software.
Designers tend to design modules such that they can be executed and/or compiled
separately and independently. Modular design unintentionally follows the rule of ‘divide
and conquer’ problem solving strategy, this is because there are many other benefits
Advantage of modularization:
RESERVATION FORM : -
This form is used for the reservation of ticket. The main advantage of the form is
that it has the easiest of the user interface. This makes it user friendly and easy to
use. It has Passenger’s name, address, contact no, source and destination station
CANCELLATION FORM :-
This form consists of cancelation. the user interface is again easy. One just needs
FARE RECORDS :-
This form is used for the fare between two station with a specific class.
TRAIN ENQUIRY:-
Train enquiry is used for knowing available trains between two stations. We need
to provide source and destination names or codes and then we will be given the
RESERVATION ENQUIRY:-
This form is used to know if there is any seat available in a train. Here we need to
SEAT DETAILS :-
This form is used to know about the seat later using our PNR no.
Coding:-
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
tm = DateTime.Today;
//drp_select_movie.Items.Add("Select Center");
drp_select_date.Items.Add(Convert.ToString(tm.ToShortDateString()
));
tm = tm.AddDays(1);
drp_select_date.Items.Add(Convert.ToString(tm.ToShortDateString()
));
tm = tm.AddDays(1);
drp_select_date.Items.Add(Convert.ToString(tm.ToShortDateString()
));
drp_select_date.Enabled = true;
drp_select_date.Visible = true;
drp_select_movie.Enabled = false;
}
protected void btn_reset_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx");
}
protected void btn_book_now_Click1(object sender, EventArgs
e)
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString =
ConfigurationManager.ConnectionStrings["cinema_tckt_bookingConnec
tionString"].ConnectionString;
conn.Open();
string center
=Convert.ToString( drp_select_center.SelectedItem);
string movie =
Convert.ToString( drp_select_movie.SelectedItem);
string date = drp_select_date.SelectedValue;
string time =
Convert.ToString( drp_select_time.SelectedItem);
string sql = "insert into movie_info
(center_name,movie_name,date,time) values('" + center + "','" +
movie + "','" + date + "','" + time + "')";
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.ExecuteNonQuery();
string del="delete from booking_info";
string del1 = "delete from booking";
string insert = "insert into booking (no_of_seats,type)
values('0','gold')";
string insert1 = "insert into booking (no_of_seats,type)
values('0','silver')";
SqlCommand delete = new SqlCommand(del, conn);
SqlCommand delete1 = new SqlCommand(del1, conn);
SqlCommand inser = new SqlCommand(insert, conn);
SqlCommand inser1 = new SqlCommand(insert1, conn);
delete.ExecuteNonQuery();
delete1.ExecuteNonQuery();
inser.ExecuteNonQuery();
inser1.ExecuteNonQuery();
Response.Redirect("login.aspx?m="+movie);
}
}
/*************************************************************/
using System.Configuration;
using System.Data;
//using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
//using System.Xml.Linq;
using System.Data.SqlClient;
public partial class login : System.Web.UI.Page
{
}
protected void btn_login_Click(object sender, EventArgs e)
{
string u = Request.QueryString["m"];
SqlConnection conn = new SqlConnection();
conn.ConnectionString =
ConfigurationManager.ConnectionStrings["cinema_tckt_bookingConnec
tionString"].ConnectionString;
conn.Open();
string sql = "select * from login where username='" +
txt_uname.Text + "' and password='" + txt_password.Text + "'";
SqlCommand cmd = new SqlCommand(sql, conn);
SqlDataReader dr;
dr = cmd.ExecuteReader();
if (dr.Read())
{
conn.Close();
conn.Open();
string sql1 = "update movie_info set
username='"+txt_uname.Text+"' where movie_name=('"+ u +"')";
SqlCommand cmd1 = new SqlCommand(sql1, conn);
cmd1.ExecuteNonQuery( );
lbl_message.Text = "login sucessfull";
Response.Redirect("booking.aspx?q="+txt_uname.Text);
}
else
lbl_message.Text = "login failed";
}
protected void btn_register_Click(object sender, EventArgs e)
{
Response.Redirect("register.aspx");
}
}
/**************************************************************************/
using System;
using System.Collections;
using System.Configuration;
using System.Data;
//using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
}
}
using System;
using System.Collections;
using System.Configuration;
using System.Data;
//using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
}
}
TESTING
Introduction:-
Testing is the process of exercising software with the intent of finding errors and
ultimately correcting them. The following testing techniques have been used to make this
Content Review
The whole content of the project has been reviewed thoroughly to uncover typographical
Navigation Errors
Different users were allowed to navigate through the project to uncover the navigation
errors. The views of the user regarding the navigation flexibility and user friendliness
Unit Testing:-
A unit can be compiled /assembled / linked/loaded; and put under a test harness.
Unit testing done to show that the unit does not satisfy the application and /or its
Integration testing done to show that even though components were individually
System Testing:-
requirements (test characteristics that are only present when entire system is run)
A system is a big component.
components.
Concern: issues, behaviors that can only be exposed by testing the entire integrated
each form encapsulates (labels, texts, grid etc.). Hence in case of project in V.B. form are
the basic units. Each form is tested thoroughly in term of calculation, display etc.
Regression Testing:-
Each time a new form is added to the project the whole project is tested thoroughly to
rectify any side effects. That might have occurred due to the addition of the new form.
any method, including black-box testing. This allows the software team to examine parts
of a system that are rarely tested and ensures that the most important function points have
been tested. Code coverage as a software metric can be reported as a percentage for:
reports on the number of lines executed to complete the test 100% statement coverage
ensures that all code paths, or branches (in terms of control flow) are executed at least
once. This is helpful in ensuring correct functionality, but not sufficient since the same
Black-box testing:-
Black-box testing treats the software as a "black box", examining functionality without
any knowledge of internal implementation. The tester is only aware of what the software
is supposed to do, not how it does it. Black-box testing methods include: equivalence
partitioning, boundary value analysis, all-pairs testing, state transition tables, decision
table testing, fuzz testing, model-based testing, use case testing, exploratory testing and
specification-based testing.
applicable requirements. This level of testing usually requires thorough test cases to be
provided to the tester, who then can simply verify that for a given input, the output value
(or behavior), either "is" or "is not" the same as the expected value specified in the test
case.
Alpha Testing:-
independent test team at the developers' site. Alpha testing is often employed for off-the-
shelf software as a form of internal acceptance testing, before the software goes to beta
testing.
Beta Testing:-
Beta testing comes after alpha testing and can be considered a form of external user
acceptance
testing. Versions of the software, known as beta versions, are released to a limited
audience outside of the programming team. The software is released to groups of people
so that further testing can ensure the product has few faults or bugs. Sometimes, beta
versions are made available to the open public to increase the feedback field to a maximal
other information decision, The variety of sizes and types of computing resources
available puts a burden on the analyst who must select hardware, software and advise the
Today, selecting a system is a serious and time-consuming. The time spent on the
selection process is a function of the applications and whether the system is a basic
There are various important factors, which should be considered prior to system
Specify the magnitudes of the problem; that is, clarify section entails a few
Provide user indoctrination. This is crucial, especially for first time users. Selling
the system to the user staff, provide adequate training and creating an environment
with the help of management. The selection process consists of several steps, which are
discussed below:
to describe how requirements are ideally implemented throughout the development. This
available in Appendix 2), this chapter discusses their interrelations and integration.
processes, methods, and roles. Because elements such as a change control board,
traceability, and extensive reviews require considerable resources, smaller and more
flexible organizations may need to tailor the framework's concepts. Tailoring of the
Role Compilation
Data redundancy:-
It means that same data fields appear in many different files and often in different
formats. In manual system, it poses quite a big problem because the data has to be
maintained in large volumes but in our system, this problem can be overcome by
providing the condition that if the data entered is duplicate, it will not be entered,
In manual system, searching information is time consuming but in our system, any
security has been provided. The person can access the system by providing the correct
This project as title “Online Railway Reservation System” is comes under the
with the help of JSP 6.0 and Microsoft Access. This application can also be run on the
From a proper analysis of positive points and constraints on the component it can be
safely concluded that the product is a highly efficient GUI based component. This
application is working properly and meeting to all user requirements. This component
Nothing is perfect in this world. So, we are also no exception. Although, we have tried
our best to present the information effectively, yet, there can be further enhancement in
the Application. We have taken care of all the critical aspects, which need to take care of
during the development of the Project. Like the things this project also has some
limitations and can further be enhances by someone, because there are certain drawbacks
INTRODUCTION :-
Deployment, and Maintenance. Maintenance is the last stage of the software life
cycle. After the product has been released, the maintenance phase keeps the
The earlier phases should be done so that the product is easily maintainable. The
design phase should plan the structure in a way that can be easily altered.
Similarly, the 5 implementation phase should create code that can be easily read,
understood, and changed. Maintenance can only happen efficiently if the earlier
phases are done properly. There are four major problems that can slow down the
at best insufficient, and software maintenance having a bad image. The success of
the maintenance phase relies on these problems being fixed earlier in the life
fixing bugs in the code. Adaptive maintenance deals with adapting the software to
new environments.
Market Conditions - Policies, which changes over the time, such as taxation and
Client Requirements - Over the time, customer may ask for new features or
system) of the target host changes, software changes are needed to keep
adaptability.
Organization Changes - If there is any business level change at client end, such
venturing into new business, need to modify in the original software may arise.
Types of maintenance :-
In a software lifetime, type of maintenance may vary based on its nature. It may
may be a large event in itself based on maintenance size or nature. Following are
order to correct or fix problems, which are either discovered by user or concluded
keep the software product up-to date and tuned to the ever changing world of
to keep the software usable over long period of time. It includes new features,
new user requirements for refining the software and improve its reliability and
performance.
future problems of the software. It aims to attend problems, which are not
Cost of Maintenance :-
software maintenance found that the cost of maintenance is as high as 67% of the
There are various factors, which trigger maintenance cost go high, such as:
Older software’s, which were meant to work on slow machines with less memory
and storage capacity cannot keep themselves challenging against newly coming
Most maintenance engineers are newbie and use trial and error method to rectify
problem.
Often, changes made can easily hurt the original structure of the software, making
Changes are often left undocumented which may cause more conflicts in future.
Programming Language
IEEE provides a framework for sequential maintenance process activities. It can be used
in iterative manner and can be extended so that customized items and processes can be
included.
may itself report via logs or error messages.Here, the maintenance type is
classified also.
Software Re-engineering :-
When we need to update the software to keep it to the current market, without impacting
Legacy software cannot keep tuning with the latest technology available in the market.
For example, initially Unix was developed in assembly language. When language C
Other than this, sometimes programmers notice that few parts of software need more
It is a process to re-structure and re-construct the existing software. It is all about re-
arranging the source code, either in same programming language or from one
programming language to a different one. Restructuring can have either source code-
Re-structuring does not impact the functionality of the software but enhance reliability
and maintainability. Program components, which cause errors very frequently can be
The dependability of software on obsolete hardware platform can be removed via re-
structuring.
Forward Engineering :-
hand which were brought down by means of reverse engineering. It assumes that there
Forward engineering is same as software engineering process with only one difference –
Example
The login procedures used on the web can be considered as components, printing system
Components have high cohesion of functionality and lower rate of coupling, i.e. they
work independently and can perform tasks without depending on other modules.
In OOP, the objects are designed are very specific to their concern and have fewer
In modular programming, the modules are coded to perform specific tasks which can be
There is a whole new vertical, which is based on re-use of software component, and is
software.
Reuse Process
Two kinds of method can be adopted: either by keeping requirements same and
Maintenance clearly plays an important role is the life cycle of a software product.
As noted earlier, the cost of maintenance in the United States has been estimated at
more than $70 billion annually for more than ten billion lines of existing code.
bugs in the code, the maintenance phase also incorporates three other main aspects
serves to modify the software for use in new environments, such as a new
Web Sites:
www.apache.org
www.wikipedia.com