Report
Report
Report
1. Introduction ----------------------------------------------------------------1
2. Objective & Scope of the Project------------------------------------2
3. Theoretical Background -----------------------------------------------3
4. Problem Definition & Analysis ---------------------------------------8
5. System Implementation ---------------------------------------------- 10
6.1 The Hardware Confugration: -------------------------------------- 10
6.2 The Softwares Confugration:-------------------------------------- 10
6.3 The System Confugration:---------------------------------------------10
This program is designed for the use of Railway Reservation System and
its functioning Main Objective of this project to facilitate the transactions
through use of electronic medium. We use Java Net Beans 6.5 Software and
MySQL to programming our project .
• User module
• Train Adding Module
• Ticket Reservation management
In the Software we can register as a user and user has of two types,
guest and administrator. Administrator has the power to add new user and
can edit and delete a user. A guest can register as user and can edit train and
delete his trains. The administrator can add edit and delete trains from
database. All the users can see the trains and seats status.
[Type text]
2. Objective & Scope of the Project
✓ The proposed system should maintain all the records , and should generate
the required reports and information when required.
In its current scope, the software enables user 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.
During the development of this project, Java NetBeans IDE, a powerful, open
source event-driven form-based development environment is used for modular
design and future expandability of the system.
[Type text]
3. Theoretical Background
A Primary key is one or more fields whose value or values uniquely identify each
record in a table. In a 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.
[Type text]
Role of RDBMS Application Program:
A computer 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 re-organize 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 done
by means of a general-purpose software package called a Database Management
System (DBMS). Some commercially available DBMS 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 following
capabilities:
[Type text]
3.2 What is My SQL ?
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 logo) 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, and process data stored in a computer
database, you need 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 applications.
[Type text]
In the spring of 1999, NetBeans DeveloperX2 was released, supporting
Swing. The performance improvements that came in JDK 1.3, released in the fall of
1999, made NetBeans a viable choice for development tools. By the summer of
1999, the team was hard at work re-architecting DeveloperX2 into the more modular
NetBeans that forms the basis of the software today. Something else was afoot in the
summer of 1999: Sun Microsystems wanted better Java development tools, and had
become interested in NetBeans. It was a dream come true for the NetBeans team:
NetBeans would become the flagship tool set of the maker of Java itself! By the Fall,
with the next generation of NetBeans Developer in beta, a deal was struck. Sun
Microsystems had also acquired another tools company, During the acqusition, the
young developers who had been involved in open-source projects for most of their
programming careers, mentioned the idea of open-sourcing NetBeans. Fast forward
to less than six months later, the decision was made that NetBeans would be open
sourced. While Sun had contributed considerable amounts of code to open source
projects over the years, this was Sun's first sponsored open source project, one in
which Sun would be paying for the site and handling the infrastructure.
Features of NetBeans
A free, open-source Integrated Development Environment for software
developers. You get all the tools you need to create professional desktop,
enterprise, web, and mobile applications with the Java platform, as well as C/C++,
PHP, JavaScript, Groovy, and Ruby. NetBeans IDE 6.9 introduces the JavaFX
Composer, support for JavaFX SDK 1.3, OSGi interoperability, support for the PHP
Zend framework and Ruby on Rails 3.0, and more.
[Type text]
4. Problem Definition & Analysis
EXISTING SYSTEM:
S
ystem Analysis is a detailed study of the various operations performed by a system
and their relationships within and outside of the system. Here the key question is-
what all problems exist in the present system? What must be done to solve the
problem? Analysis begins when a user or manager begins a study of the program using
existing system.
During analysis, data collected on the various files, decision points and transactions
handled by the present system. The commonly used tools in the system are Data Flow
Diagram, interviews, etc. Training, experience and common sense are required for
collection of relevant information needed to develop the system. The success of the system
depends largely on how clearly the problem is defined, thoroughly investigated and
properly carried out through the choice of solution. A good analysis model should provide
not only the mechanisms of problem understanding but also the frame work of the solution.
Thus it should be studied thoroughly by collecting data about the system. Then the
proposed system should be analyzed thoroughly in accordance with the needs.
System analysis can be categorized into four parts.
In the current system we need to keep a number of records related to the trains and
want to enter the details of the trains and the seats manually. In this system only the
administrator authority views and edit trains details and add they want to enter the details
of the student. This is time consuming and has much cost.
PROPOSED SYSTEM
In our proposed system we have the provision for adding the details of the trains
by themselves. So the overhead of the railway authorities and the athorities is become less.
Another advantage of the system is that it is very easy to edit the details of the trains and
delete trains, seats when it found unnecessary. The detail of trains is added in the database
and so passenger can also view the marks whenever they want.
[Type text]
Our proposed system has several advantages
FEASIBILITY ANALYSIS
Whatever we think need not be feasible .It is wise to think about the feasibility of
any problem we undertake. Feasibility is the study of impact, which happens in the
organization by the development of a system. The impact can be either positive or negative.
When the positives nominate the negatives, then the system is considered feasible. Here
the feasibility study can be performed in two ways such as technical feasibility and
Economical Feasibility.
Technical Feasibility:
We can strongly says that it is technically feasible, since there will not be much
difficulty in getting required resources for the development and maintaining the system as
well. All the resources needed for the development of the software as well as the
maintenance of the same is available in the organization here we are utilizing the resources
which are available already.
Economical Feasibility:
Development of this application is highly economically feasible .The
organization needed not spend much money for the development of the system already
available. The only thing is to be done is making an environment for the development with
an effective supervision. I f we are doing so , we can attain the maximum usability of the
corresponding resources .Even after the development , the organization will not be in
condition to invest more in the organization .Therefore , the system is economically
feasible.
[Type text]
5. System Implementation
The system must be running Windows 98, Windows 98 or Windows NT4.0 operating system and
must meet the following hardware requirements.
[Type text]
6. System Design & Development
[Type text]
6.2 OUTPUT DESIGN
[Type text]
try {
Connection con=NewCon.connect();
Statement st=con.createStatement();
Statement st1=con.createStatement();
st.executeUpdate("update user set logged='0'");
String sql="select * from user where email='"+email+"' and
password='"+Password+"'";
ResultSetrs=st.executeQuery(sql);
if(rs.next())
{
st1.executeUpdate("update user set logged='1' where email='"+email+"' and
password='"+Password+"'");
if(rs.getString("name").equals("administrator"))
{
JOptionPane.showMessageDialog(null, "login as administrator User");
newadd_Train().setVisible(true);
dispose();
}
else
{
new menu().setVisible(true);
dispose();
}
}
else
{ JOptionPane.showMessageDialog(null, "Invalid User");
}
}
catch(Exception ex) {
System.out.println(ex);
}
}//GEN-LAST:event_loginActionPerformed
private void login1ActionPerformed(java.awt.event.ActionEventevt) {//GEN-
FIRST:event_login1ActionPerformed
new signup().setVisible(true);
dispose();
[Type text]
[Type text]
private void btn_bill_add2ActionPerformed(java.awt.event.ActionEventevt) {//GEN-
FIRST:event_btn_bill_add2ActionPerformed
new reservation().setVisible(true);
dispose();
}//GEN-LAST:event_btn_bill_add2ActionPerformed
private void btn_bill_add1ActionPerformed(java.awt.event.ActionEventevt) {//GEN-
FIRST:event_btn_bill_add1ActionPerformed
new menu().setVisible(true);
jLabel1.setBounds(0, 0, 1090, 600);
getContentPane().add(jPanel43);
jPanel43.setBounds(0, 0, 1100, 620);
pack();
}// </editor-fold>//GEN-END:initComponents
private void btn_add_patient2ActionPerformed(java.awt.event.ActionEventevt)
{//GEN-
evt) {//GEN-FIRST:event_btn_add_patient4ActionPerformed
new VENUE().setVisible(true);
dispose();
}//GEN-LAST:event_btn_add_patient4ActionPerformed
private void btn_add_patient5ActionPerformed(java.awt.event.ActionEventevt)
{//GEN-FIRST:event_btn_add_patient5ActionPerformed
new el().setVisible(true);
dispose();
}//GEN-LAST:event_btn_bill_add1ActionPerformed
private void btn_bill_addActionPerformed(java.awt.event.ActionEventevt) {//GEN-
FIRST:event_btn_bill_addActionPerformed
String tnumber = number.getText();
DefaultTableModel model = (DefaultTableModel) train.getModel();
model.setRowCount(0);
Vector data = new Vector();
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/railway", "root", "tiger");
dates.setText(rs.getString(8));
profession.setText(rs.getString(9));
mobile.setText(rs.getString(10));
email.setText(rs.getString(13));
phone.setText(rs.getString(11));
quali.setText(rs.getString(12));
identi.setText(rs.getString(14));
nameoffa.setText(rs.getString(16));
nameofm.setText(rs.getString(15));
[Type text]
ddno.setText(rs.getString
Statement st = (Statement) con.createStatement();
ResultSetrset = st.executeQuery("SELECT
number,name,source,destination,arrival,departure,fare,seat FROM train where
number='" + tnumber + "'");
ResultSetMetaData md = (ResultSetMetaData) rset.getMetaData();
int columns = md.getColumnCount();
System.out.println(columns);
while (rset.next()) {
Vector row = new Vector(columns);
for (inti = 1; i<= columns; i++) {
row.addElement(rset.getObject(i));
// System.out.println(rset.getObject(i));
}
jPanel43.add(btn_add_patient4);
btn_add_patient4.setBounds(820, 360, 200, 40);
btn_add_patient5.setBackground(new java.awt.Color(255, 255, 255));
btn_add_patient5.setFont(new java.awt.
.CENTER);
btn_add_patient5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTO
M);
btn_add_patient5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEventevt) {
btn_add_patient5ActionPerformed(evt);
}
});
private void initComponents() {
jPanel43 = new javax.swing.JPanel();
btn_add_patient2 = new javax.swing.JButton();
DATEAVAILABLE = new javax.swing.JLabel();
surname = new javax.swing.JTextField();
jLabel87 = new javax.swing.JLabel();
jLabel88 = new javax.swing.JLabel();
firstname = new javax.swing.JTextField();
jLabel89 = new javax.swing.JLabel();
jLabel90 = new javax.swing.JLabel();
dob =
.JLabel();
data.addElement(row);
// System.out.println(data);
// System.out.println(row);
model.addRow(row);
[Type text]
//model.addRow(new Object[]{medicinename, batchno, quantity, price,
price1});
}
rset.close();
st.close();
} catch (Exception e) {
System.out.println(e.getMessage());
System.out.println(e.getStackTrace());
}
[Type text]
private void btn_add_patient_exitActionPerformed(java.awt.event.ActionEventevt)
{//GEN-FIRST:event_btn_add_patient_exitActionPerformed
dispose();
}//GEN-LAST:event_btn_add_patient_exitActionPerformed
private void addActionPerformed(java.awt.event.ActionEventevt) {//GEN-
FIRST:event_addActionPerformed
String tnumber = number.getText();
String tname = name.getText();
String tfrom = from.getText();
String tto = to.getText();
String tarrival = arrival.getText();
String tdepartur = departure.getText();
String tfare = fare.getText();
String tseat1=seat.getText();
inttseat=0;
try{
tseat=Integer.parseInt(tseat1);
}
permasddre.setText(rs.getString(20));
(rs.getString(14));
nameoffa.setText(rs.getString(16));
nameofm.setText(rs.getString(15));
ddno.setText(rs.getString(17));
dddate.setText(rs.getString(19));
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Invalid number of seats ");
}
[Type text]
try
{
Connection con = (Connection) NewCon.connect();
Statement st = (Statement) con.createStatement();
ResultSetrs=st.executeQuery("select * from train where number='"+tnumber+"'");
if(rs.next())
{
JOptionPane.showMessageDialog(null, "train number already exists");
}
else
{
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3306/passport", "root",
"tiger");
Statement st = (Statement) con.createStatement();
int no1=(Integer.parseInt(hiden.getText()))-1;
String no=String.valueOf(no1);
hiden.setText(no);
String sql = "select * from user where id='"+no+"'";
ResultSetrs = st.executeQuery(sql);
if (rs.next()) {
firstname.setText(rs.getString(3));
(rs.getString(19));
bank.setText(rs.getString(18));
}
st.executeUpdate("insert into
train(number,name,source,destination,arrival,departure,seat,fare) values('" + tnumber +
"',"
+ "'" + tname + "','" + tfrom + "','" + tto + "','" + tarrival + "','" + tdepartur
+ "','" + tseat + "','" + tfare + "')");
JOptionPane.showMessageDialog(null, "train added");
new menu().setVisible(true);
dispose();
}
}
[Type text]
7. SYSTEM IMPLEMENTATION
Implementation is the stage in the project where the theoretical design is turned
into a working system. The implementation phase constructs, installs and operates the
new system. The most crucial stage in achieving a new successful system is that it will
work efficiently and effectively.
There are several activities involved while implementing a new project. They are
➢ End user training
➢ End user Education
➢ Training on the application software
➢ System Design
➢ Parallel Run and To New System
➢ Post implementation Review
[Type text]
8. SOFTWARE TESTING
Is the menu bar displayed in the appropriate contested some system related features
included either in menus or tools? Do pull –Down menu operation and Tool-bars work
properly? Are all menu function and pull down sub function properly listed ?; Is it possible
to invoke each menu function using a logical assumptions that if all parts of the system
are correct, the goal will be successfully achieved .? In adequate testing or non-testing
will leads to errors that may appear few months later.
This create two problem
1. Time delay between the cause and appearance of the problem.
2. The effect of the system errors on files and records within the system
The purpose of the system testing is to consider all the likely variations to which it will
be suggested and push the systems to limits.
The testing process focuses on the logical intervals of the software ensuring that
all statements have been tested and on functional interval is conducting tests to uncover
errors and ensure that defined input will produce actual results that agree with the required
results. Program level testing, modules level testing integrated and carried out.
White box sometimes called “Glass box testing” is a test case design uses the
control structure of the procedural design to drive test case.
Using white box testing methods, the following tests where made on the system
a) All independent paths within a module have been exercised once. In our system,
ensuring that case was selected and executed checked all case structures. The bugs that
were prevailing in some part of the code where fixed
b) All logical decisions were checked for the truth and falsity of the values.
[Type text]
9. User Manual
To install a MySQL database from a dump file ( pro.sql) , simply follow the following steps.
Step 1: Copy the Lib.sql file in C:\Program files\Mysql\MySql server 5.1\Bin folder.
Step 2: Open MySQL and type the following command to create the dabase named pro.
mysql> create database pro;
Step 3: Open Command Window (Start Run cmd)
Step 4: Go to the following folder using CD command of DOS.
C:\Program files\Mysql\MySql server 5.1\Bin>
Step 5: type the following command on above prompt -
C:….\bin> mysql -u root -pkvuc pro < pro.sql
This will create a Library databse with required tables.
[Type text]
10. References
In order to work on this project titled Ralway Reservation System, the following
books and literature are refered by me during the various phases of development of
the project.
-by Shildit
– Gruber
(4) http://www.mysql.org/
(5) http://www.netbeans.org/
11. CONCLUSION
Our project is only a humble venture to satisfy the needs in an Institution.
Several user friendly coding have also adopted. This package shall prove to be a
powerful package in satisfying all the requirements of the organization.
The objective of software planning is to provide a frame work that enables the
manger to make reasonable estimates made within a limited time frame at the
beginning of the software project and should be updated regularly as the project
progresses. Last but not least it is not the work that played the ways to success but
ALMIGHTY.
THANKS
[Type text]