You are on page 1of 120

Railway reservation system

Introductio
n

1
Railway reservation system

INTRODUCTION

To cope up with these day-to-day


activities in Railway Reservation, the use of
computer (in Railway Sector) is
unavoidable.
This project provides the facility to
all users to reserve the seats. They can
also update and delete the reservation, and
also get the information of the status of the
train.

The Railway Reservation System aims at


solving these day-to-day functions in
reservation Sector:

2
Railway reservation system

 Reservation,

 Modification,

 Cancellation,

 Show All Transaction, etc.

SDLC
Model
3
Railway reservation system

SDLC MODEL

The System Development Life Cycle


(SDLC),is a methodology that has been
constructed to ensure that systems are
designed and implemented in a methodical,
logical and step-by-step approach.

There are various software deveolpemt


approaches defined and designed which are
used/employed during development process
4
Railway reservation system

of software, these approaches are also


referred as “Software Development Process
Models”.

Each process model follows a particular life


cycle in order to ensure successin process of
software development.

One such approach/process which we are


using for this site is “The waterfall Model”.
Waterfall approach was first Process Model to
be introduced and followed widely in Software
Engineering to ensure success of the project.
In “The Waterfall” approach, the whole
process of software development is divided
into separate process phases. The phases in
Waterfall model are:
Requirment specifications phase, Software
Design, Implementation and Testing &
Maintenance. All these phases are cascaded
to each other so that second phase is
started as and when defined set of goals
are achieved for Methods and processes

5
Railway reservation system

undertaken in Waterfall Model are more


visible.

The software process model used for the


railway reservation system is the
“waterfall model”.

Requirements/Analysis
and Specifications

Design

Implementation and
unit testing

6
Railway reservation system

Integration and
system testing

Operation and
maintainance

The waterfall model suggests a systematic,


sequential approach to software
development that begins at the system level
and progresses through analysis, design,
coding, testing, and support. This model
encompasses the following activities:

 Software Requirement Analysis

The goal of this phase is understand


the exact requirement of the customer and
to document them properly. This phase
produces a large documents, which contain
a description of what the system will do
without describing how it will done. The
resultant document is known as
SoftwareRequirement Specifications(SRS).

 Design

7
Railway reservation system

The goal of the phase is to transform the


requirement specifications into a structure
i.e suitable for implementation in some
programming language. This work is
documented and known as software design
description(SDD) document.

 Implementation and unit testing

The implementation or coding phase


proceeds smoothly because all information
neededby the software developers
contained in the SDD. During testing,the
major activities are centered around the
examination and modification of the code.

 Integration ande system testing

Effective testing will contributed the


delivery of higher quality software
products,most satisfied the users, lower
maintainence cost and more accurate and
reliable results. This is little chance to
determine that the interface between
8
Railway reservation system

modules is also correct and for this reason


integration testing is performed.

 Operation and maintenance

Software maintenance is a task that every


development group has to face,when the
software is delivered to the customer
side,installed and is operational.
Maintenance is a very broad activity that
includes error correction, enhancement of
capabilities deletion of absolute capabilities
and optimization.

Reasons for choosing WATERFALL MODEL:

 In this model, a detailed checking is


done at each and every step by software
quality assurance (SQA) group and also
by the clients. That is why it involves
less risk of rejection by clients.
9
Railway reservation system

 Good progress tracking due to clear


development stages
 It is very easy to understand and
implement.
 It is documentation driven, that is,
documentation is produced at every
stage.
 Testing is inherent to every phase of the
waterfall model. So there is no need for
a separate testing phase.
 Getting the requirements and design out
of the way first also improves quality;
it's much easier to catch and correct
possible flaws at the design stage.
 Finally, the first two phases end in the
production of a formal specification, the
waterfall model can aid efficient

10
Railway reservation system

knowledge transfer when team members


are dispersed in different locations.

There are some disadvantages of the


waterfall model.
1)As it is very important to gather all possible
requirements during the Requirement
Gathering and Analysis phase in order to
properly design the system, not all
requirements are received at once, the
requirements from customer goes on
getting added to the list even after the end
of “Requirement Gathering and Analysis”
11
Railway reservation system

phase, this affects the system development


process and its success in negative aspects.
2)The problems with one phase are never
solved completely during that phase and in
fact many problems regarding a particular
phase arise after the phase is signed off,
this result in badly structured system as not
all the problem (related to a phase) are
solved during the same phase.
3)The project is not partitioned in phases in
flexible way.
As the requirements of the customer
goes on getting added to the list, not all the
requirements are fulfilled, this results in
development of almost unusable system.
These requirements are then met in newer
version of the system; this increases the
cost of system development.

12
Railway reservation system

System

13
Railway reservation system

Analysis

SYSTEM ANALYSIS

What is System?

The term system is derived from the


Greek word systema, which means an
organized relationship among functioning
units or components. A system exists
because it is designed to achieve one or
more objectives. This means a system is an
orderly grouping of interdependent
14
Railway reservation system

components linked together according to a


plan to achieve a specific objective. The
study of systems concept has three basic
implications:
A system must be designed to achieve a
predetermined objective.
Interrelationship and interdependence
must exits among components.
The objectives of the organization as a
whole have higher priority that the
objectives of its subsystems.
How we know these objectives of the
system? From the analysis of user’s
requirements and studying present system.
First of all we have to analyze present
system thoroughly and asking all the
problems of the user. Then check the
feasibility of the system.

2.1 Feasibility Study and Cost Benefit


Analysis of the System:

Feasibility Study:
Feasibility study is done after
preliminary investigation. The feasibility
study means to check the feasibility of new
system. There may be other alternative to
15
Railway reservation system

the problems. Feasibility study is mainly


three type eg. technical ,economic and
operational feasibility. We have to check all
conditions to the new system. From the
analysis it is found that new system is
feasible. Main points are as:

Technical Feasibility: During this study,


it is found that the institute has enough
resource to implement new system. There
is already exists a computer systems with
suitable hardware and software in the
concerned department. There is no
problem of financial resources and budgets.
Thus the new system is technically feasible.

Economic Feasibility: Economic feasibility


is the most important study that
determines the cost and benefits of the
proposed system and compares with the
budget. The cost of the new system does
not outweigh the budget. The cost of the
project includes the cost of hardware,
software, development and
implementation. The new system also
provides benefits that are expected from
the proposed system and compare these
16
Railway reservation system

with the costs expected to spend on


development of the system. Benefits are
found to be more than costs, thus it is
decided to develop new system. The new
system provides both tangible (e.g.,
increased productivity, low operating cost,
etc.) and intangible benefits (e.g.,
improved organizational planning,
improved asset utilization, etc.) in a formal
way. Thus the new system is economical
feasible.

Operational Feasibility: It is found that


the new system is both economic and
technical feasible, the next step is to
determine whether it is operationally
feasible or not. During operational
feasibility study, it is found that the system
will operate in the way that user wants.
There is enough human resources and
there are qualified and experienced
manpower available for development and
implementation of the system. The new
system is acceptable to the peoples and
management. Thus the new system is also
operational feasible. User involvement is

17
Railway reservation system

more required in determining the


operational feasibility.

Cost Benefit Analysis:


Since cost plays an important role in
deciding the new system, it must be
identified and estimated properly. Costs
vary in types and consist of various distinct
elements. Benefits are also of different
type and can be grouped on the basis of
advantages they provides to management.
In estimating cost for the system, we
considered several cost estimates which
the concern will have to pay. Some cost
factors are as:

Hardware Cost: This cost relates to actual


purchase of computer and peripherals.
Organization already has computer system
and other peripherals. Thus there is no
need to by new system. Thus system is
cost feasible.

Personnel Cost: This cost include EDP


staff salaries and benefits. In the
organization there is already proper staff
available. Thus there is no need to recruit
18
Railway reservation system

additional staff. Thus new system is cost


feasible.

Facility Costs: These are expenses


incurred in the preparation of the site
where computers are to be installed. This
includes wiring, flooring etc. since there is
proper site so there is no need to prepare
extra site.

Supply Costs: These are variable costs


which increase with increased use like the
use of paper, disks, ink cartridges etc.
since the system is fully automatic so it
there is no problem of supply cost against
the benefit.

Benefits of a system include four types:

Cost-saving Benefit: These benefits lead


to reduction in administrative and
operational costs. After implementation of
new system there is no need to recruit
extra staff. Even if extra person required to
transfer information is not required
because system is on Local network and
Information can be accessed easily. So this
19
Railway reservation system

system provides cost saving benefit over


the administrative and operating cost.

Cost-Avoidance Benefit: These benefits


are those, which eliminate future
administrating and operational costs. Since
there is enough person to handle the new
system, so there is no need to hire
additional staff in future. Thus the new
system provides cost avoidance benefit.

Improved-Service-Level-benefit: These
benefits are those where the performance
of a system is improved by new system.
Since there is manual system in the
existing system, after implementation of
new computer based system the
performance of process will increases.

Improved-information-Benefit: This is
the benefit where computer based methods
leads to better information for decision-
making. This system generates reports
automatically, thus processing speed
increased. Now more volume of transaction
can be handled easily.

20
Railway reservation system

Thus from above discussion the new


system is better choice over traditional
manual system.

21
Railway reservation system

2.2. System Planning

The system planning process consists the


following:-
 Setting the project start date.
 Setting the project complete date.
 Selecting the methodology or project life
cycle to be used.
 Determining the scope of the project in
terms of the phase of the selecting
project methodology or project life cycle.
 Identifying any pre determined interim
milestone on other critical dates which
must be met.
 Listing tasks, by project phase, in order
in which they might be accomplished.
 Determining skill level necessary to
perform each task.
 Determining task dependencies
o Which task can be done in parallel?
o Which task requires the completion
of other tasks before they can start?
22
Railway reservation system

 Performing project cost estimation and


cost- benefit analysis.

23
Railway reservation system

System analysis is a process of gathering


and interpreting facts, diagnosing problems
and the information to recommend
improvements on the system. It is a
problem solving activity that requires
intensive communication between the
system users and system developers.
System analysis or study is an important
phase of any system development process.
The system is studied to the minutest detail
and analyzed. The system analyst plays the
role of the interrogator and dwells deep into
the working of the present system. The
system is viewed as a whole and the input
to the system are identified. The outputs
from the organizations are traced to the
various processes. System analysis is

24
Railway reservation system

concerned with becoming aware of the


problem, identifying the relevant and
decisional variables, analyzing and
synthesizing the various factors and
determining an optimal or at least a
satisfactory solution or program of action.

A detailed study of the process must be


made by various techniques like interviews,
questionnaires etc. The data collected by
these sources must be scrutinized to arrive
to a conclusion. The conclusion is an
understanding of how the system functions.
This system is called the existing system.

Now the existing system is subjected to


close study and problem areas are
identified. The designer now functions as a

25
Railway reservation system

problem solver and tries to sort out the


difficulties that the enterprise faces. The
solutions are given as proposals. The
proposal is then weighed with the existing
system analytically and the best one is
selected. The proposal is presented to the
user for an endorsement by the user.

The proposal is reviewed on user request


and suitable changes are made. This is loop
that ends as soon as the user is satisfied
with proposal.

Preliminary study is the process of


gathering and interpreting facts, using the
information for further studies on the
system. Preliminary study is problem
solving activity that requires intensive

26
Railway reservation system

communication between the system users


and system developers. It does various
feasibility studies. In these studies a rough
figure of the system activities can be
obtained, from which the decision about the
strategies to be followed for effective
system study and analysis can be taken.

27
Railway reservation system

Existing System

In the existing system the exams are done


only manually but in proposed system we
have to computerize all the exams using
this software.

 Lack of security of data.


 More man power.
 Time consuming.
 Consumes large volume of pare
work.
 Needs manual calculations.
 No direct role for the higher officials.

28
Railway reservation system

Proposed System

The aim of proposed system is to


develop a system of improved facilities. The
proposed system can overcome all the
limitations of the existing system. The
system provides proper security and
reduces the manual work.

 Security of data.
 Ensure data accuracy’s.
 Proper control of the higher officials.
 Minimize manual data entry.
 Minimum time needed for the various
processing.
 Greater efficiency.
 Better service.
 User friendliness and interactive.

29
Railway reservation system

 Minimum time required.


PRELIMINARY INVESTIGATION

It’s the first step in the system development


life cycle to evaluate the feasibility of the
system. The goal of the preliminary
investigation is to appraise project requests.
It is neither a design study nor the
collection of details to explain the system in
all regards. But it is the collection of
information that assists the committee
members in making the appraisal of the
project requested and determine the
feasibility of the proposed project as an
informed judgment.

Following targets are achieved in the


process of preliminary investigation:

30
Railway reservation system

 Understanding the concept and


objectives of the project requested.
 Optimum size of the project.
 Cost-benefits-analysis of alternative
approaches.
 Evaluate the technical and operational
feasibility of alternatives.
 Formation of report (Conclusion).
 Submission of report to management -
recommendation, acceptance and
rejection of the project requested.

31
Railway reservation system

Conducting the investigation


Conducting the investigation means the
collection of data by the analysts during the
preliminary investigation through three
primary techniques, these are as follows.
I. Reviewing organization documents:
According to this method, the analysts
engaged in the investigation first
acknowledge themselves about the
organization involved in, or affected by
the project by examining organization
charts and studying written operating
procedures. For example, to review in
Offline examination proposal means
knowing first how the works & also how
the links are connected with the
databases. In this way, reviewing

32
Railway reservation system

organization document method proved


useful in achieving the stated objectives.
II. On-site observations: It is an another
significant techniques to collect data for
the purpose of investigation. As per this
method, the analyst observe the activity
of the system directly. One purpose of
on-site observation is to get as chose as
possible to the real system being
studied. All that is highly significant in
conducting the investigation in reference
to the proposed project.
III. Conducting Interviews: The above
two techniques tell the analyst how the
system operates but not provide enough
details to have a decision to be made
about the merits of a system proposal

33
Railway reservation system

and also the user views about current


operations, For this, analyst use
interviews to collect such details which
tell about the nature of the project
request and the reasons for submitting it.
Interview furnishes the details that
further explain the project and show
whether assistance is merited
economically, operationally and
technically.

34
Railway reservation system

OBJECTIVE

 To design a database comprising of the


required tables and to provide a Front
End Application.

 To allow a valid user to use the


application.

 Provide interface to all the tables used in


the application for modification,
cancellation and reservation of ticket
(Reservation of tickets, modification
tickets, cancellation tickets By
Authorized Person).

 Providing the reservation information


and helping them to search reservation
records.

35
Railway reservation system

1.1 Problem analysis

The system will make the


management of reservation efficient. It will
make easier for the user to maintain the
reservation records in a systematic way.
The information flows from one stage to
other become easy and more accessible.

The use of proper system will


enable the user to quickly answer
customer’s queries. And there will be no
need of searching whole lot of registers
for small information.

Thus, it will make the


processing of information faster. The
system provides printed reports to the
customer, thus accelerating the response
time. The system ensures security of the
customer’s record, so that no illegal
modifications can be made to it.

36
Railway reservation system

1.2 Requirement Analysis

User Interface

Here, our the user interface of the


proposed system shall be VB forms containing
Menu bars, Buttons, Keyboard Shortcuts,
Check boxes, List boxes etc. according to the
requirement. User can use Mouse to click
the button or choose from the menu and
Keyboard to enter the data.

Hardware Interfaces

This software product shall be run


properly on IBM PC or any other PC the
minimum hardware requirement for this
software product shall be 64 MB RAM, 10 GB
or more secondary memory, CD ROM for
installation of this product. This software

37
Railway reservation system

product shall use WINDOW 98 operating


system for establish the interface between
software and hardware. The interfaces
provided by the Windows OS are sufficient.
Oracle and VB also use same interfaces.

Software Interfaces

We shall uses the following software to


design this product :

 Microsoft VISUAL BASIC version 6.0 as


programming language and as front end
user interface.

 ORACLE version as a data base.

 WINDOW version 95/98 as an operating


system.

 MDAC (Microsoft Data Access


Component) or ODBC (Open Data
Base Connectivity) to create an inter

38
Railway reservation system

face between Microsoft VB and product


ORACLE.

 MDAC or ODBC is a S/W that acts as an


interface between Oracle and VB forms. In
case of Intranet/LAN workstations, where
same data is shared among many users,
global data area is used.

Communication Interfaces

Since our proposed system shall be net-


enabled so, communication interface is
Required . Proposed system contains four
sites working concurrently. In the proposed
system, single database which is common to
all four sites will be available on server and
all sites will be attached to server actively. In
case of intranetworking, Windows NT
protocols are already in use. In case of
mailing to developers for further query,
Microsoft Outlook Express is by default used
by the Windows OS.
39
Railway reservation system

1.3 Hardware and Software Requirement

RAILWAY RESERVATION SYSTEM


requires following resources for its
optimal performance: -
Railway System works on systems
having Windows as the Operating System.
Railway System can work on any of the
Windows Versions such as Windows 95,
Windows 98, Windows 2000, and Windows
NT etc.
The Software used for developing our
project named “ Railway reservation System
” is as follows: -
1) Coding of the project – Visual Basic 6.0
2) Components of the project – Visual Basic
6.0
3) Maintenance and recording of data –
Oracle
4) Hardware required - Pentium 4
160 GB Hard disk

40
Railway reservation system

504 MB RAM

1.4 FEASIBILITY STUDY

Feasibility study

Operational Economical Technical


feasibility feasibility feasibilty

1.4.1 OPERATIONAL FEASIBILITY

It is mainly related to human


organizational and political aspects. The
points to be considered are:

 What changes will be brought with the


system?

 What organizational structures are


disturbed?
41
Railway reservation system

 What new skills will be required? Do the


existing staff members have these
skills?

 If not, can they be trained in due course


of time?

Generally project will not be rejected


simply because of operational in feasibility
but such considerations are likely to
critically affect the nature and scope of the
eventual recommendations.

For operational feasibility study we


appointed a small group of people who
are familiar with information system
techniques, who understand the parts of the
business that are relevant to the project and
are skilled in system analysis and design
process.

1.4.2 ECONOMIC FEASIBILITY


Economic analysis is the most
frequently used technique for evaluating
the effectiveness of a proposed system.

42
Railway reservation system

More commonly known as cost / benefit


analysis; in this procedure we determine
the benefits and savings that are expected
from a proposed system and compare them
with costs. We found the benefits outweigh
the costs; we take a decision to design
and implement the new proposed system.

It is very essential to ascertain the cost,


which is to incur for developing the project,
before starting the development of the
project. If the benefit, which is to be
accrued by developing the software,
exceeds the cost to be incurred for
developing the project by a fair amount of
margin, then only the software should be
developed. The process of cost and benefit
analysis is not only limited prior to the time
period of development of the project, but
this process is a continuous process, and it
keeps on going during the entire life cycle of
the software.

ANALYSIS OF COST

43
Railway reservation system

The programmer has done the analysis of


cost of the project named “Railway
Reservation System” in a very effective
manner. According to the programmer, the
total cost involved in the development and
implementation of the software at the client
site would be around Rs. 40000. This is so,
as the process is manual, a computer
system is to be purchased to implement the
project at the Organization. The computer
system would cost around Rs.26000, the
cost involved in the development of the
project would be around Rs.5000, the cost
involved in the purchase of software
required for implementing the project would
be around Rs.5000, and above all the cost
of training the manager to use the software
is around Rs.3000 as the manager is not
familiar with computers.

ANALYSIS OF BENEFIT

As it is necessary to do cost analysis of the


developed project, it is also very essential to
do benefit analysis along with it. The
programmer has done the analysis of the
benefit arising from the use of the software
44
Railway reservation system

named “Railway Reservation system” in a


very effective way.

1.4.3 TECHNICAL FEASIBILITY

This is concerned with specifying


equipment and software that will
successfully satisfy the user requirement.
The technical needs of the system may
vary considerably, but might include:

 The facility to produce outputs in a given


time.

 Response time under certain conditions.

 Ability to process a certain volume of


transaction at a particular speed.

 Facility to communicate data to distant


location.

After examining technical feasibility, we


give more importance to the configuration of
45
Railway reservation system

the system than the actual make of


hardware. The configuration gives the
complete picture about the system's
requirements: Twenty to thirty workstations
are required; these units should be
interconnected through LAN or Internet so
that they could operate and communicate
smoothly.
They should have enough speeds of input and
output to achieve a particular quality of
printing.

46
Railway reservation system

System
Design

47
Railway reservation system

DESIGN

Design Principles
 The design should be traceable to the
analysis model.

 The design should “ minimize the


intellectual distance” between the
software and the problem as it exists in
the real world.

 The design should exhibit uniformity and


integration.

 The design should be structured to


accommodate change.

 The design should be structured to


degrade gently, even when aberrant

48
Railway reservation system

data, events, or operating conditions are


encountered.

 The design is not coding, coding is not


design.

 The design should be assessed for


quality as it is being created, not after
the fact.

 The design should be reviewed to


minimize conceptual errors.

49
Railway reservation system

2.1 ENTITY RELATIONSHIP DIAGRAM

ENTITY-RELATIONSHIP DIAGRAM
OF THE PROJECT

ADDRESS
NAME
TIC_NO
ID
PH_NO.
PASSENGER

RESERVE
TICKET

DESTINATION

TRAIN

TRAIN_NO
50 TRAIN
DATE
Railway reservation system

Explaining the ER diagram drawn before


with respect to the above components.

Data objects involved in our system:

 Passenger

 Train

Attributes of each data object are:

 Attributes of data object “Passenger”


are:Id, name , address,Tic_no, & ph_
no.
 Attributes of data object “Train” are:
Train_no,Traindate and destinction.

Relationship between data object are


defined as follows:

51
Railway reservation system

 Many passenger can request for


reservation to a single user and
occurrences of both are mandatory.

52
Railway reservation system

 A report is released corresponding to


each result and occurrences of both are
mandatory.

53
Railway reservation system

 2.2 DATA FLOW DIAGRAM

A Data Flow Diagram (DFD) is a diagram


that describes the flow of data and the
processes that change or transform data
throughout a system. It’s a structured
analysis and design tool that can be used
for flowcharting in place of, or in association
with, information oriented and process
oriented system flowcharts.

When analysts prepare the Data Flow


Diagram, they specify the user needs at a
level of detail that virtually determines the
information flow into and out of the system
and the required data resources. This
network is constructed by using a set of
symbols that do not imply a physical
implementation.

The Data Flow Diagram reviews the current


physical system, prepares input and output
specification, specifies the implementation
plan etc.

54
Railway reservation system

Four basic symbols are used to construct


data flow diagrams. They are symbols that
represent data source, data flows, and data
transformations and data storage. The
points at which data are transformed are
represented by enclosed figures, usually
circles, which are called nodes.

Data Flow Diagram Symbols:-

(1) Source or Destination of data (External Entities) :

External entities represents any entity that supplies or receives information from

the system but is not a part of the system

(2) Data Flow :

The data flow is used to describe the movement of chunks or packets of

information from one part of the system to another part. Flows represents data

in motion.

55
Railway reservation system

(3) Process :

Process shows a part of the system that transforms inputs into outputs. That is, it
shows how one or more inputs are changed into outputs.

(4) Storage :

The data store is used to model a collection of data packets at rest. Any place
accumulates is a data store.

CONTEXT LEVEL DATA FLOW DIAGRAM

VALID
REQUEST

ISSUE
QUERY
TICKET

RAILWAY
PASSENGER RESERVATION
SYSTEM

INVALID
56 REJECT
REQUEST
REQUEST
Railway reservation system

LEVEL-1 DATA FLOW DIAGRAM


PASSENGER

Interact
with user
(atten-
Resultant data
dant)

Review
and
approva
l
DATA
ENTRY &
Approved
VERIFICA result
-TIONS
ISSUE
Reports
TICKET

TRAIN
TIMETABL
Train
E

Analyzed data

Transactio
Add
n
Reserve passenge
occur
r
detail

57
Railway reservation system

2.3 DATABASE DESIGN

Table Name: TRAIN

Field Name Data Type


T_NO Number(4)
T_NAME Varchar2(20)
ST_FROM Varchar2(20)
ST_TO Varchar2(20)
DEP_DT Date
DEP_TIME Number(5,2)
FC_TOT Number(3)
BC_BK Number(3)
SC_TOT Number(3)
SC_BK Number(3)
AC_TOT Number(3)
AC_BK Number(3)

This table contains the information of the train.

58
Railway reservation system

Table Name: RESERVE


Field Name Data Type
T_NO Number(4)
TIC_NO Number(5)
NAME Varchar2(20)
ST_FROM Varchar2(12)
ST_TO Varchar2(12)
J_DT Date
CLASS Varchar2(15)

This table contain the information of the ticket


reservation.

59
Railway reservation system

2.3 USER INTERFACE DESIGN

Railway System fulfills the following criteria: -

LOGIN SCREEN

This is login screen where you can enter


password. When you enter password and click on
enter then software validate your password,
when your password is correct then software
60
Railway reservation system

provide all facility of the software otherwise show


error message and exit out form the software.

SPLASH SCREEN

61
Railway reservation system

MDIFORM

This is main screen, you can see the control


screen. You can operate all function of the
software only from here.
62
Railway reservation system

RESERVATION

63
Railway reservation system

This is reservation screen from where you can


take reservation of the railway where you
want to go.

QUERY

64
Railway reservation system

This is used for select the criteria for query.

REPORT

It shows the report about train information and


reservation information.

65
Railway reservation system

SUCCESS

66
Railway reservation system

It shows the reservation have been completed.

CANCEL
67
Railway reservation system

It shows the reservation have been cancelled.

QUIT

68
Railway reservation system

69
Railway reservation system

Coding

CODING
70
Railway reservation system

The goal of coding or programming is to


translate the design of the system produced
during the design phase into code in a given
programming language which can be executed by
a computer and that performs the computation
specified by the design for a given design the aim
is to implement the design in a best possible
manner.

During the implementation,it should be


kept in mind that the programs should not be
constructed so that they easy to write but so that
they easy to read and understand.

LOGIN SCREEN
71
Railway reservation system

Private Sub Command2_Click()


End
End Sub

Private Sub lgn_Click()


If pw.Text = "railway" Then
Unload Me
Load frmSplash
frmSplash.Show
Else
MsgBox "Invalid password"
End If
End Sub

SPLASH SCREEN
72
Railway reservation system

Private Sub Timer1_Timer()


I=I+1
If I > 3 Then
Unload Me
'Load main
MDIForm1.Show
End If
End Sub

Private Sub Timer2_Timer()


Label3.ForeColor = RGB(255, 255, 255) * Rnd
Label4.ForeColor = RGB(255, 255, 255) * Rnd
Label5.ForeColor = RGB(255, 255, 255) * Rnd
Label6.ForeColor = RGB(255, 255, 255) * Rnd
End Sub

QUERY
73
Railway reservation system

Public connect As New ADODB.Connection


Dim RS As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
Dim comm As New ADODB.Command

Private Sub COMFIELD_CLICK()


Text1.Text = " "
MSHFlexGrid1.Clear
End Sub

Private Sub Command1_Click()


Select Case COMFIELD.Text
Case "T_NO"
If LIST1.Text = "TRAIN DETAILS" Then

74
Railway reservation system

Set RS = connect.Execute("SELECT * FROM


TRAIN WHERE T_NO='" & Text1.Text & "'")
End If
If LIST1.Text = "RESERVATION DETAILS"
Then
Set rs1 = connect.Execute("SELECT * FROM
RESERVE WHERE T_NO='" & Text1.Text & "'")
End If
Case "T_NAME"
Set RS = connect.Execute("SELECT * FROM
TRAIN WHERE T_NAME='" & Text1.Text & "'")
Case "DEP_DT"
Set RS = connect.Execute("SELECT * FROM
TRAIN WHERE DEP_DT='" & Text1.Text & "'")
Case "TIC_NO"
Set rs1 = connect.Execute("SELECT * FROM
RESERVE WHERE TIC_NO='" & Text1.Text & "'")
Case "CLASS"
Set rs1 = connect.Execute("SELECT * FROM
RESERVE WHERE CLASS='" & Text1.Text & "'")
End Select
If LIST1.Text = "TRAIN DETAILS" Then
If RS.RecordCount = 0 Then
MsgBox "NO RECORD FOUND"
75
Railway reservation system

Else
Set MSHFlexGrid1.Recordset = RS
End If
End If
If LIST1.Text = "RESERVATION DETAILS" Then
If rs1.RecordCount = 0 Then
MsgBox "NO RECORD FOUND"
Else
Set MSHFlexGrid1.Recordset = rs1
End If
End If
End Sub

Private Sub Form_Load()


connect =
"Provider=MSDAORA.1;Password=tiger;User
ID=scott;Persist Security Info =True"
connect.Open
comm.ActiveConnection = connect
connect.CursorLocation = adUseClient
LIST1.AddItem "TRAIN DETAILS"
LIST1.AddItem "RESERVATION DETAILS"
RS.Open "SELECT * FROM TRAIN", connect,
adOpenKeyset, adLockBatchOptimistic
76
Railway reservation system

rs1.Open "SELECT * FROM RESERVE", connect,


adOpenKeyset, adLockBatchOptimistic
End Sub

Private Sub Form_Unload(Cancel As Integer)


connect.Close
End Sub

Private Sub List1_Click()


COMFIELD.Clear
Text1.Text = " "
MSHFlexGrid1.Clear
Dim numfield As Integer
If LIST1.Text = "TRAIN DETAILS" Then
Set RS = connect.Execute("SELECT
T_NO,T_NAME,DEP_DT FROM TRAIN")
numfield = RS.Fields.Count
For I = 0 To numfield - 1
COMFIELD.AddItem RS.Fields(I).Name
Next
End If
If LIST1.Text = "RESERVATION DETAILS" Then
Set rs1 = connect.Execute("select
T_NO,TIC_NO,CLASS from reserve")
77
Railway reservation system

numfield = rs1.Fields.Count
For I = 0 To numfield - 1
COMFIELD.AddItem rs1.Fields(I).Name
Next
End If
End Sub

Private Sub Text1_KeyUp(KeyCode As Integer,


Shift As Integer)
If KeyCode = 13 Then
Command1.SetFocus
Command1_Click
End If
End Sub

RESERVATION

78
Railway reservation system

Public connect As New ADODB.Connection


Dim RS As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
'Dim rs2 As New ADODB.Recordset
Dim comm As New ADODB.Command
Dim ADDCHECK As Boolean ' BY DEFAULT FALSE
Dim MODCHECK As Boolean
Dim MCLASS As String
Dim LCLASS As String
Dim MTICNO As String
Dim LTICNO As String

Private Sub Datatno_Change()

79
Railway reservation system

Set RS = connect.Execute("SELECT * FROM train


where t_no=" & Datatno.Text)
tname.Text = RS("t_name")
tstfr.Text = RS("st_from")
tstto.Text = RS("st_to")
tdtdp.Text = Format(RS!dep_dt, "DD-MMM-
YYYY")
tdptm.Text = RS("dep_time")
pjdt.Text = tdtdp.Text
If ADDCHECK = True Or MODCHECK = True Then
pname.SetFocus
End If
End Sub

Private Sub Form_Load()


connect =
"Provider=MSDAORA.1;Password=tiger;User
ID=scott;Persist Security Info =True"
connect.Open
comm.ActiveConnection = connect
connect.CursorLocation = adUseClient
RS.Open "SELECT * FROM TRAIN", connect,
adOpenKeyset, adLockBatchOptimistic
With Datatno
80
Railway reservation system

.ListField = "T_NO"
Set .RowSource = RS
If Not RS.EOF Then
RS.MoveFirst
.Text = RS("T_NO")
End If
End With
rs1.Open "select * from reserve", connect,
adOpenKeyset, adLockBatchOptimistic
Datatno_Change
End Sub

Function ADDFUNCTION()
BUTTONHANDLER ("00000110")
ADDCHECK = True
Datatno.Enabled = True
pname.Enabled = True
pclass.Enabled = True
pticno.Enabled = True
pname.Text = " "
pticno.Text = " "
pclac2.Value = False
pclfc.Value = False
pclsc.Value = False
'rs1.AddNew
81
Railway reservation system

End Function

Function SAVEFUNCTION()
Set RS = connect.Execute("SELECT * FROM train
where t_no=" & Datatno.Text)
If pname.Text = " " Or _
(pclac2.Value = False And pclfc.Value = False
And pclsc.Value = False) Or _
pticno.Text = " " Then
MsgBox "FIELD CAN'T BE LEFT BLANK"
BUTTONHANDLER ("00000110")
Exit Function
End If
If ADDCHECK = True Then
If pclac2.Value = True Then
MCLASS = "AC2"
ElseIf pclfc.Value = True Then
MCLASS = "FC"
ElseIf pclsc.Value = True Then
MCLASS = "SC"
End If
connect.Execute ("INSERT INTO RESERVE
VALUES('" & Datatno.Text & "' , '" & pticno.Text
& "' , '" & pname.Text & "' , '" & tstfr.Text & "' , '"
82
Railway reservation system

& tstto.Text & "' , '" & pjdt.Text & "' , '" &
MCLASS & "')")
If MCLASS = "AC2" Then
connect.Execute ("UPDATE TRAIN SET
AC2_TOT=AC2_TOT-1,AC2_BK=AC2_BK+1
WHERE T_NO=" & Datatno.Text)
End If
If MCLASS = "FC" Then
connect.Execute ("UPDATE TRAIN SET
FC_TOT=FC_TOT-1,FC_BK=FC_BK+1 WHERE
T_NO=" & Datatno.Text)
End If
If MCLASS = "SC" Then
connect.Execute ("UPDATE TRAIN SET
SC_TOT=SC_TOT-1,SC_BK=SC_BK+1 WHERE
T_NO=" & Datatno.Text)
End If
Success.show
End If
If MODCHECK = True Then
If pclac2.Value = True Then
MCLASS = "AC2"
ElseIf pclfc.Value = True Then
MCLASS = "FC"
83
Railway reservation system

ElseIf pclsc.Value = True Then


MCLASS = "SC"
End If
connect.Execute ("UPDATE RESERVE SET
TIC_NO='" & pticno.Text & "' ,NAME='" &
pname.Text & "' ,CLASS= '" & MCLASS & "'
WHERE TIC_NO='" & LTICNO & "'")
' UPDATE TRAIN WITH THE OLD VALUES
If LCLASS = "AC2" Then
connect.Execute ("UPDATE TRAIN SET
AC2_TOT=AC2_TOT+1,AC2_BK=AC2_BK-1
WHERE T_NO=" & Datatno.Text)
End If
If LCLASS = "FC" Then
connect.Execute ("UPDATE TRAIN SET
FC_TOT=FC_TOT+1,BC_BK=BC_BK-1 WHERE
T_NO=" & Datatno.Text)
End If
If LCLASS = "SC" Then
connect.Execute ("UPDATE TRAIN SET
SC_TOT=SC_TOT+1,SC_BK=SC_BK-1 WHERE
T_NO=" & Datatno.Text)
End If
' UPDATE TRAIN WITH THE NEW VALUES
84
Railway reservation system

If MCLASS = "AC2" Then


connect.Execute ("UPDATE TRAIN SET
AC2_TOT=AC2_TOT-1,AC2_BK=AC2_BK+1
WHERE T_NO=" & Datatno.Text)
End If
If MCLASS = "FC" Then
connect.Execute ("UPDATE TRAIN SET
FC_TOT=FC_TOT-1,BC_BK=BC_BK+1 WHERE
T_NO=" & Datatno.Text)
End If
If MCLASS = "SC" Then
connect.Execute ("UPDATE TRAIN SET
SC_TOT=SC_TOT-1,SC_BK=SC_BK+1 WHERE
T_NO=" & Datatno.Text)
End If
End If

ADDCHECK = False
MODCHECK = False
Datatno.Enabled = False
pname.Enabled = False
pclass.Enabled = False
pticno.Enabled = False
pname.Text = " "
85
Railway reservation system

pticno.Text = " "


pclac2.Value = False
pclfc.Value = False
pclsc.Value = False
BUTTONHANDLER ("11000001")
End Function

Function SRHFUNCTION()
MTICNO = InputBox("ENTER TICKET NUMBER")
Set rs1 = connect.Execute("SELECT * FROM
RESERVE WHERE TIC_NO='" & MTICNO & "'")
If rs1.RecordCount = 0 Then
MsgBox "DATA NOT FOUND"
BUTTONHANDLER ("11000001")
Else
Datatno.Text = rs1("T_NO")
Datatno_Change
pname.Text = rs1("NAME")
pticno.Text = rs1("TIC_NO")
LTICNO = rs1("TIC_NO")
pjdt.Text = Format(rs1!J_DT, "DD-MMM-
YYYY")
LCLASS = rs1("CLASS")
If rs1("Class") = "AC2" Then
86
Railway reservation system

pclac2.Value = True
ElseIf rs1("CLASS") = "FC" Then
pclfc.Value = True
ElseIf rs1("CLASS") = "SC" Then
pclsc.Value = True
End If
BUTTONHANDLER ("00111001")
End If

End Function

Function CLRFUNCTION()
pname.Text = " "
pticno.Text = " "
pclac2.Value = False
pclfc.Value = False
pclsc.Value = False
BUTTONHANDLER ("11000001")
End Function

Function MODFUNCTION()
MODCHECK = True
pname.Enabled = True
pclass.Enabled = True
87
Railway reservation system

pticno.Enabled = True
BUTTONHANDLER ("00000110")
End Function

Function DELFUNCTION()
Set RS = connect.Execute("SELECT * FROM train
where t_no=" & Datatno.Text)
If pclac2.Value = True Then
MCLASS = "AC2"
ElseIf pclfc.Value = True Then
MCLASS = "FC"
ElseIf pclsc.Value = True Then
MCLASS = "SC"
End If
connect.Execute ("DELETE FROM RESERVE
WHERE TIC_NO='" & pticno.Text & "'")
' UPDATE TRAIN WITH THE OLD VALUES
If LCLASS = "AC2" Then
connect.Execute ("UPDATE TRAIN SET
AC2_TOT=AC2_TOT+1,AC2_BK=AC2_BK-1
WHERE T_NO=" & Datatno.Text)
End If
If LCLASS = "FC" Then

88
Railway reservation system

connect.Execute ("UPDATE TRAIN SET


FC_TOT=FC_TOT+1,BC_BK=BC_BK-1 WHERE
T_NO=" & Datatno.Text)
End If
If LCLASS = "SC" Then
connect.Execute ("UPDATE TRAIN SET
SC_TOT=SC_TOT+1,SC_BK=SC_BK-1 WHERE
T_NO=" & Datatno.Text)
End If
CLRFUNCTION
BUTTONHANDLER ("11000001")
Cancel.show
End Function

Function CANFUNCTION()
ADDCHECK = False
MODCHECK = False
Datatno.Enabled = False
pname.Enabled = False
pclass.Enabled = False
pticno.Enabled = False
pname.Text = " "
pticno.Text = " "
pclac2.Value = False
pclfc.Value = False
89
Railway reservation system

pclsc.Value = False
BUTTONHANDLER ("11000001")
End Function

Private Sub Form_Unload(Cancel As Integer)


connect.Close
End Sub

90
Railway reservation system

REPORT

Private Sub Form_Activate()


Option1.Value = False
Option2.Value = False
End Sub

Private Sub Option2_Click()


If Option2.Value = True Then
RESERVERPT.Show
Else
REPORT.Show
End If
End Sub

Private Sub Option1_Click()


If Option1.Value = True Then
TRAINRPT.Show

91
Railway reservation system

Else
REPORT.Show
End If
End Sub

MDIFORM

Private Sub MNUFEXIT_Click()


End
End Sub

Private Sub MNUFQRY_Click()


BUTTONHANDLER ("00000001")
QUERY.Show
End Sub

Private Sub MNUFRES_Click()


92
Railway reservation system

BUTTONHANDLER ("11000001")
reserve.Show
End Sub

Private Sub MNUFRP_Click()


BUTTONHANDLER ("00000001")
REPORT.Show
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button


As MSComctlLib.Button)
Dim FRM As Variant
On Error GoTo ERRHANDLER
Set FRM = MDIForm1.ActiveForm
Select Case Button.Key
Case "ADDREC"
FRM.ADDFUNCTION
Case "SRHREC"
FRM.SRHFUNCTION
Case "CLRREC"
FRM.CLRFUNCTION
Case "MODREC"
FRM.MODFUNCTION
Case "DELREC"
93
Railway reservation system

FRM.DELFUNCTION
Case "SAVEREC"
FRM.SAVEFUNCTION
Case "CANREC"
FRM.CANFUNCTION
Case "CLSFRM"
Unload FRM
End Select
ERRHANDLER:
Exit Sub
End Sub

94
Railway reservation system

CANCEL

Private Sub CMDNO_Click()


Unload Me
MDIForm1.Show
End Sub

Private Sub CMDYES_Click()


LOGIN.Show
End Sub

95
Railway reservation system

SUCCESS

Private Sub CMDNO_Click()


Unload Me
End Sub

Private Sub CMDYES_Click()


Unload Me
LOGIN.Show
End Sub

96
Railway reservation system

QUIT

Private Sub CMDNO_Click()


Unload Me
Load MDIForm1
MDIForm1.Show
End Sub

Private Sub CMDYES_Click()


End
End Sub
97
Railway reservation system

MODULE

Dim SECONNECT As ADODB.Connection


Dim STRCONNECTION As String

Sub MAIN()
STRCONNECTION =
"Provider=MSDAORA.1;Password=TIGER;User
ID=SCOTT;Persist Security Info=True"
OPENDATA
LOGIN.Show
'MDIForm1.Show
'Unload USER
End Sub

Function OPENDATA()
On Error Resume Next
CLOSEDATA
SECONNECT.Open STRCONNECTION
End Function
Function CLOSEDATA()
On Error Resume Next
SECONNECT.Close
End Function
98
Railway reservation system

Function BUTTONHANDLER(BTNSTATE As String)


Dim I As Integer
For I = 1 To Len(BTNSTATE)
If Mid(BTNSTATE, I, 1) = "1" Then
MDIForm1.Toolbar1.Buttons(I).Enabled = True
ElseIf Mid(BTNSTATE, I, 1) = "0" Then
MDIForm1.Toolbar1.Buttons(I).Enabled = False
End If
Next
End Function

99
Railway reservation system

Testing

100
Railway reservation system

TESTING

Software testing is a critical element of


software quality assurance and represents the
ultimate review of specification, design, and
code generation. Once source code has been
generated, software must be tested to uncover
as many tests as possible before delivery to the
customer.

These techniques provide systematic guidance


for designing tests that exercise the internal
logic of software components and exercise the
input and output domains of the program to
uncover errors in program function, behavior,
and performance.

Testing Objectives:

The rules that can serve well as testing


objectives:

101
Railway reservation system

 Testing is a process of executing a program


with the intent of finding an error.

 A good test case is one that has a high


probability of finding an as-yet-
undiscovered error.

102
Railway reservation system

Testing
Screen

LOGIN SCREEN

103
Railway reservation system

Wrong password

RESERVATION

104
Railway reservation system

Wrong ticket number

105
Railway reservation system

Field left bank

QUERY
106
Railway reservation system

107
Railway reservation system

No record found

108
Railway reservation system

Reservation details

109
Railway reservation system

Reservation confirmed

110
Railway reservation system

Reservation cancelled

111
Railway reservation system

Reports

Report 1

112
Railway reservation system

Report 2

113
Railway reservation system

Report 3

114
Railway reservation system

CONCLUSION

The project is developed keeping in mind the


growing necessity of the RAILWAY RESERVATION
SYSTEM.

“Railway reservation system” is a useful product


for managing the reservation within an
organization. This project provides the facility to
all users to do operations of the train. They can
also update & delete the reservation, and also get
the information of the status of reservation. The
project provides the facility to add new customer.
The user has the right to get any information
about the reservation at any time without any
permission of regarding department.

Though this project the working department can


enter the information of the new reservation, can
update reservation & can also delete reservation
as per the request of the user.

115
Railway reservation system

So, the project has capabilities of improving


from its present state. The project in future can
be used as a base to develop a new project with
more facilities added in it. We can also change
this project so that it can work on different
platform.

116
Railway reservation system

Future Scope and Limitations

Scope of project
 The main benefit of this project is that it
facilitate user to communicate in a faster
manner in comparison of manual system.
Through this system the current status of the
reservation can be known easily whereas in
manual system it is a difficult task.

 To provide quick service without any delay.

 The future project can include the facility of


web-application so that customer can access
their reservation, pay bills and solve their
queries online

117
Railway reservation system

 The future project can provide a back plan for

functionality.

Limitation of the project

 Railway System may not work properly on


Linux and Macintosh based Systems.

 Railway System requires its users to have


prior knowledge of both computers and
reservation procedure.

 There is no provision for waiting list, ID proof,


photograph and Signature for verification
purpose.

118
Railway reservation system

BIBLIOGRAPHY

 Software Engineering – A Practitioner’s


Approach
By Roger S. Pressman

 Software Engineering
By K. K. Aggarwal
Yogesh Singh

 An Introduction to Database Systems


By Elmasri
Navathe

 Oracle PL/SQL
119
Railway reservation system

By Ivan Bayross

120

You might also like