Railway Management System

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI-590018

A DBMS Mini Project

On

“RAILWAY MANAGEMENT SYSTEM”

A Mini project report submitted in partial fulfillment of the requirements for the 5th semester of
Bachelor of Engineering in Information Science Engineering
of Visvesvaraya Technological University, Belagavi

Submitted by

Sushan J S-1ST21IS057

Under the Guidance of


Dr LATHA P H
Dept. Of ISE

DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING


SAMBHRAM INSTITUTE OF TECHNOLOGY

M.S.Palya, Vidyaranyapura, Bangalore-560097

2023-2024
Department of Information Science and Engineering

CERTIFICATE

Certified that the Mini Project work entitled “RAILWAY MANAGEMENT SYSTEM” has been
successfully carried out by Mr. Sushan J S (1ST21IS057) a bonafide student of Sambhram
Institute of Technology, Bangalore in partial fulfillment of the requirements for the 5th semester of
Bachelor of Engineering in Information Science and Engineering of the Visvesvaraya
Technological University, Belgaum during the academic year 2023-2024.It is certified that all
corrections/suggestions indicated for Internal Assessment have been incorporated in the Report
deposited in the departmental library. The mini project report has been approved as it satisfies the
laboratory requirements of 5th semester BE,ISE

Mrs Chaitra V S Dr LATHA P H


Associate Professor, HOD,
Dept Of ISE Dept of ISE

External Viva
Signature With Date
Name of the Examiners
1.
2.
ACKNOWLEDGEMENT

Any achievement, be it scholastic or otherwise does not depend solely on the individual efforts but on the
guidance, encouragement and cooperation of intellectuals, elders and friends. A number of personalities, in
their own capacities have helped me in carrying out this project work. We would like to take this opportunity
to thank them all.

I would like to thank Dr. H.G. Chandrakanth, Principal, SaIT, Bangalore, for his moral support towards
completing my project. I would like to thank Dr. LATHA P H, Prof & Head, Department of Information
Science & Engineering, SaIT, Bangalore, for his valuable suggestions and expert advice. I deeply express my
sincere gratitude to my guide. Mrs. Chaitra S V Associate Professor, SaIT, Bangalore, for their able guidance,
regular source of encouragement and assistance throughout this project.

I would like to thank all the teaching and non-teaching staff of Department of Information Science &
Engineering, Salt, Bengaluru for their constant support and encouragement
ABSTARCT

The report introduces the railway management system, its objectives, scope, and features. It also provides
the background information and motivation for developing the system.

The report reviews the existing literature and studies related to railway management systems, their
advantages and disadvantages, and the gaps or challenges that need to be addressed.

The report analyzes the requirements and specifications of the railway management system, such as the
functional and non-functional requirements, the use cases, the data flow diagrams, the entity-relationship
diagrams, etc. It also describes the design and architecture of the system, such as the system modules, the
user interface, the database design, the system flowcharts, etc.

The report explains the implementation and testing of the railway management system, such as the tools
and technologies used, the coding standards, the testing methods, the test cases, the test results, etc. It also
discusses the challenges and difficulties faced during the implementation and testing phase, and how they
were resolved or overcome.

The report evaluates the performance and effectiveness of the railway management system, such as the
user feedback, the system usability, the system reliability, the system security, etc. It also summarizes the
main findings and contributions of the report, and provides recommendations and suggestions for future
work and improvement.
TABLE OF CONTENTS
Chapter Page no
1.Introduction 1-2
1.1 Overview 1
1.2 Problem Statement 1
1.3 Objectives 2
2. Literature Survey 3
2.1 Tools and Technology 3
3. Requirement Specification 4-5
3.1 Functional Requirements 4
3.2 Non-Functional Requirements 4
3.3 Software Requirements 5
3.4 Hardware Requirements 5
4. System Design 6-8
4.1 ER Diagram 6
4.2 Relational Schema 7
5. Implementation 9-15
5.1 Frontend 9
5.2 Backend 13
6. Snapshot 16-18
7. Conclusion 19
8. References 20
LIST OF FIGURES
Fig No. Description Page No.

3.1.1 Xampp 4

3.1.2 Vs code 4

3.1.3 My SQL 4

3.1.4 Firefox 4

4.1.1 ER diagram 6

4.2.1 Schema 7

5.1.1 Navigation bar snippet 8

5.1.2 About Us page snippet 10

5.1.3 To view ticket details snippet 11

5.1.4 Contact Us age snippet 12

5.2.1 DB Connection 14

5.2.2 Backend view of created tables 15

6.1 User page 16

6.2 Check availability 16

6.3 Admin login page 17

6.4 About us 17

6.5 Contact us 18
Railway Management System

CHAPTER 1

INTRODUCTION

1.1 Overview

A database is an organized collection of data. A relational database, more restrictively, is a


collection of schemas, tables, queries, reports, views, and other elements. Database designers
typically organize the data to model aspects of reality in a way that supports processes requiring
information, such as (for example) modelling the availability of rooms in hotels in a way that
supports finding a hotel with vacancies.

A database-management system (DBMS) is a computer-software application that interactswith


end-users, other applications, and the database itself to capture and analyse data. A general-
purpose DBMS allows the definition, creation, querying, update, and administration of databases.
Well-known DBMSs includes MySQL Microsoft SQL Server, Oracle, Sybase, SAP HANA,
MySQL, SQLite and IBM DB2.

A database is not generally portable across different DBMSs, but different DBMSs can
interoperate by using standards such as SQL and ODBC or JDBC to allow a single application to
work with more than one DBMS. Computer scientists may classify database- management
systems according to the database models that they support; the most popular (database systems
since the 1980s have all supported the relational model generally associated with the SQL
language Sometimes a DBMS is loosely referred to as a "database".

1.2 Problem Statement

The Railway Management System (RMS) is designed to optimize and manage the complex workings of railway
operations. The RMS aims to provide a comprehensive database solution that facilitates efficient scheduling,
tracking, and management of railway services. The system will address the following key areas:

1. Station Management: Maintain a detailed record of all railway stations, including their names, locations,
and facilities.
2. Track Management: Keep track of the railway tracks connecting various stations, ensuring that the data
reflects current operational status and maintenance schedules.
3. Train Management: Manage train details such as train IDs, names, types, and capacities.
4. Schedule Management: Create and update schedules for all trains, including departure and arrival times,
station stops, and route details.
5. Reservation Management: Handle booking and reservation of tickets, providing real-time availability and
confirmation to passengers.
1
Dept of ISE 2023-2024
Railway Management System

6. User Management: Manage user accounts for passengers and railway staff, ensuring secure access to
system functionalities.

The RMS will leverage a relational database management system to ensure data integrity, consistency, and security.
The goal is to develop a user-friendly interface that allows for seamless interaction with the database, providing
accurate and timely information to both passengers and railway personnel.

1.3 Objectives

The main objectives of a Railway Management System DBMS mini project typically include

1. Efficiency: To streamline railway operations by automating scheduling, ticketing, and tracking.


2. Reliability: To ensure accurate and real-time information is available for both passengers and railway staff.
3. Safety: To maintain and manage safety records, including maintenance schedules for trains and tracks to
enhance travel safety.
4. User Experience: To provide a user-friendly interface for passengers to make reservations, check train
schedules, and receive updates.
5. Data Management: To create a centralized database that ensures data integrity, security, and easy retrieval
of information.
6. Scalability: To design the system in a way that it can grow with increasing data and user demands without
performance issues.

These objectives aim to modernize and improve the overall functionality of railway services through the use of
database management systems.

2
Dept of ISE 2023-2024
Railway Management System

Chapter-2

LITRATURE SURVEY

2.1 Tools and Technology

There are various tools and technologies that can be used in any DBMS mini project, depending on the type,
scope, and complexity of the project. Some of the common tools and technologies are:

Database management systems: These are software applications that provide the functionality to
create, store, manipulate, and query data in a structured and organized way. Some of the popular
database management systems are MySQL, Oracle, PostgreSQL, MongoDB, etc

Programming languages: These are languages that allow developers to write instructions or commands
for the computer to execute. programming languages for DBMS mini projects are PHP, HTML ,CSS
, Javascript etc

Web development frameworks: These are tools that provide a set of features and libraries to simplify
and speed up the web development process. Some of the web development frame works are Bootstrap,
vue, react etc

Front-end technologies: These are technologies that deal with the user interface and interaction of the
web application. Some of the popular front-end technologies are HTML, CSS, JavaScript, Bootstrap,
React, etc

Testing tools: These are tools that help developers to check the functionality, performance, and quality
of the web application. Some of the popular testing units are Xampp, Wamp.stc

3
Dept of ISE 2023-2024
Railway Management System

Chapter-3

REQUIREMENT SPECIFICATION

3.1 Functional Requirements

The system should allow users to register and login with their credentials. The system should allow users
to search for available buses and routes based on their source and destination locations. The system should
allow users to book and cancel bus passes online and generate a unique pass number for each booking.
The system should store and manage the details of users, buses, routes, and bookings in a MySQL database.
The system should provide a user-friendly interface for both users and administrators using HTML, CSS,
and JavaScript. The system should provide security and validation features to prevent unauthorized access
and data manipulation.

3.2 Non-Functional Requirements

Non-functional requirements are the quality constraints that the system must satisfy according to
the project contract. They describe how well the system performs, such as its speed, security,
reliability, usability, etc. Some examples of non-functional requirements for a bus pass
management system DBMS mini project are:

• The system should have a response time of less than 2 seconds for any user request.
• The system should ensure the security and privacy of user data and transactions using encryption
and authentication techniques.
• The system should be reliable and available 24/7 with minimal downtime and errors.
• The system should be user-friendly and intuitive with clear instructions and feedback.
• The system should be scalable and adaptable to handle increasing user demand and changing
requirements.

3.3 Software requirements

Xaamp Fig3.3.1 Vs Code Fig 3.3.2 My SQL Fig 3.3.3 Fire Fox Fig3.3.4 Php Fig 3.3.5

4
Dept of ISE 2023-2024
ss
Railway Management System
• A front-end interface that allows users to register, login, apply for, renew, and cancel bus passes,
as well as view their pass details and history.
• A back-end database that stores the user information, pass details, payment records, and bus
routes and schedules.
• A validation and verification module that checks the user input, eligibility, and payment status,
and generates the pass ID and QR code.

• An operating system that supports the development and deployment of the system, such as
Windows, Linux, or MacOS.
• A web server that hosts the front-end interface and the back-end database, such as Apache, IIS,
or XAMPP.
• A web browser that renders the front-end interface and interacts with the back-end database, such
as Chrome, Firefox, or Edge.
• A programming language that implements the logic and functionality of the system, such as PHP
• A database management system that creates and manages the back-end database, such as
MySQL, Oracle, SQL Server,
• A development environment that facilitates the coding, debugging, and testing of the system,
such as Visual Studio, Eclipse, NetBeans, or PyCharm.
• A documentation tool that generates the mini project report based on the system code and
comments, such as Doxygen, Javadoc, Sphinx, or DocFX.

3.4 Hardware Requirements

• Processor: A minimum of 1 gigahertz (GHz) or faster with 2 or more cores on a compatible 64-bit
processor or System on a Chip (SoC).
• RAM: At least 4 gigabytes (GB).
• Storage: A storage device of 64 GB or larger.
• System firmware: UEFI, Secure Boot capable.
• TPM: Trusted Platform Module (TPM) version 2.0.
• Graphics card: Compatible with DirectX 12 or later with WDDM 2.0 driver.
• Display: High definition (720p) display that is greater than 9” diagonally, 8 bits per color channel.
• Internet connection and Microsoft account: Required for Windows 11 Pro for personal use and
Windows 11 Home during initial device set-up. Internet access is also required to perform updates and
to download and take advantage of some features

Dept of ISE 5
2023-2024
ss
Railway Management System
CHAPTER 4

SYSTEM DESIGN

4.1 Entity relationship diagram

Fig 4.1: Entity relationship diagram

An entity relationship diagram (ERD) shows the relationships of entity sets stored in a database. An entity in

this context is a company of data. In other words, ER diagrams illustrate the logical structure of databases. At

first glance entity relationship diagram looks very much like a flowchart. It is the specialized symbols, and the

meanings of these symbols,that make it unique. Entities may be characterized not may be relationships, but

also by additional properties (attributes), which include identifiers called “primary keys”. Diagrams created to

represent attributes as well as entities and relationships may be called entity- attributes-relationship diagrams,

rather than entity-relationships models.ip diagram

Types of Relationships

There are three main types of relations in a database:

• One-to-one (1:1): This means that each record in one table is related to only one record in another
table, and vice versa. For example, each employee has only one ID card, and each ID card belongs
to only one employee.

Dept of ISE 6
2023-2024
ss
Railway Management System
• One-to-many (1:N) or many-to-one (N:1): This means that each record in one table is related to
one or more records in another table, but each record in the other table is related to only one
record in the first table. For example, each customer can place many orders, but each order is
placed by only one customer.
• Many-to-many (N:N): This means that each record in one table is related to one or more records
in another table, and each record in the other table is also related to one or more records in the first
table. For example, each student can enroll in many courses, and each course can have many
students enrolled.

Strong entity A strong entity is type of entity that has a key attribute strong entity does not depend
on the other entity in the schema. It has a primary key that helps in identifying it uniquely

Weak entity An weak entity has a key attribute that uniquely identifies each entity in the entity set but
some entity type exists for which key attributes cannot be identified

4.2 Relational Schema

Fig 4.2: Schema diagram

Dept of ISE 7
2023-2024
ss
Railway Management System
• admin: This table stores administrative credentials, allowing authorized personnel to access and
manage the system.
• passenger: Contains personal and travel details of passengers, such as name, age, gender, and ticket
information (PNR number, berth number and type, coach number).
• ticket: Holds booking details, including the PNR number (which links to the passenger table), coach
details, booking ID, train number, and journey date.
• train: Lists train details like train number, journey date, and the number of seats available in different
classes (AC and sleeper).
• train_status: Provides real-time updates on train availability, including the number of seats available
in each class for a particular train on a given date.
• user: Manages user accounts, storing information such as username, name, email, and password for
system access.

The relationships between these tables ensure that the system can efficiently manage bookings, train schedules,
and user interactions. The schema is designed to maintain data integrity and support the main objectives of
the Railway Management System.

Dept of ISE 8
2023-2024
ss
Railway Management System
Chapter-5

IMPLEMENTATION
5.1 Frontend

Front end is the term used to describe the part of a website or web application that users see and interact
with. It includes the design, layout, graphics, animations, buttons, forms, and other elements that make
up the user interface. Front end developers use various programming languages and tools to create and
improve the front end of a website or web application. Some of the most common front end languages
and tools are:

• HTML: This is the markup language that defines the structure and content of a web page.
• CSS: This is the style sheet language that defines the appearance and formatting of a web page.
• JavaScript: This is the scripting language that adds interactivity and functionality to a web page.
• jQuery: This is a JavaScript library that simplifies the manipulation of HTML elements and events.
• Bootstrap: This is a CSS framework that provides ready-made components and templates
for responsive web design.
• React: This is a JavaScript library that allows developers to create dynamic and reusable user
interface components.

PHP is a server-side scripting language that can help in front end development by generating dynamic
HTML pages, embedding PHP code within HTML, and interacting with JavaScript for asynchronous tasks
using AJAX. PHP can also connect to databases, process user input, and perform various functions on the
web server. PHP is widely used for creating websites and web applications, such as WordPress, Facebook,
Wikipedia, and Zoom

Navigation Bar snippet Fig 5.1.1

Dept of ISE 9
2023-2024
ss
Railway Management System

• This is a snippet of HTML code that appears to be part of a webpage’s navigation bar.
HTML is the markup language that defines the structure and content of a web page.
• The code includes elements for toggling the navigation, linking to the dashboard, and a
dropdown menu for user profile and settings. Elements are the building blocks of HTML
pages, such as divs, spans, buttons, and lists.
• The code also uses icons from Font Awesome library to visually represent the user profile
and settings options. Font Awesome is a collection of vector icons and logos that can be easily
integrated into web pages.
• The code also has comments to label different sections, such as navbar-header and main
dropdown. Comments are used to explain the code and make it more readable.

About Us page snippet Fig 5.1.2


This is a PHP code that is used to create and update the About Us page of a Bus Pass Management System
website. Here are some key points:

• The code starts with <?php and ends with ?>, which are the tags that indicate the PHP script.
• The code uses session_start() to start a session and store the user’s ID in a variable called
$_SESSION['bpmsaid'].
• The code uses error_reporting(0) to turn off error reporting and
include('includes/dbconnection.php') to connect to the database using a separate file.
• The code checks if the user is logged in by comparing the length of $_SESSION['bpmsaid'] to
zero. If not, it redirects the user to the logout page using header('location:logout.php').

Dept of ISE 10
2023-2024
ss
Railway Management System

• The code also checks if the user has submitted the form by using isset($_POST['submit']). If yes,
it assigns the values of the form fields to variables like $pagetitle and $pagedes.
• The code uses a SQL query to update the table tblpage with the new values of the page title and
description, where the page type is ‘aboutus’.
• The code uses HTML elements to create the layout and design of the web page, such as headings,
buttons, and lists.
• The code also uses icons from Font Awesome library to visually represent the user profile and
settings options. Font Awesome is a collection of vector icons and logos that can be easily
integrated into web pages. Source
• The code also has comments to label different sections, such as navbar-header and main dropdown.

To view pass details snippet Fig 5.1.3

This is a PHP code that is used to display the details of a bus pass for a user who has logged in to the Bus Pass
Management System website

• The code starts with <?php and ends with ?>, which are the tags that indicate the PHP script.
• The code uses include('includes/dbconnection.php') to connect to the database using a separate file
that contains the connection parameters.
• The code uses session_start() to start a session and error_reporting(0) to turn off error reporting.
• The code checks if the user has logged in by using $_SESSION['bpmsaid'], which stores the user’s
ID. If not, it redirects the user to the logout page using header('location:logout.php').

Dept of ISE 11
2023-2024
ss
Railway Management System

• The code uses $_GET['viewid'] to get the ID of the pass that the user wants to view from the
URL parameter.
• The code uses a SQL query to select all the details of the pass from the table tblpass where the
ID matches the viewid.
• The code uses a foreach loop to fetch and display the results in a table format, using HTML
elements such as table, tr, th, and td.
• The code also uses echo to print the values of the pass attributes, such as pass number, category,
full name, photo, contact number, email, identity type, identity card number, source, destination,
from date, to date, cost, and pass creation date.
• The code also uses a JavaScript function called PrintDiv() to print the table when the user clicks
on the button with the value “print”. The function creates a new window and writes the HTML
content of the div element with the id divToPrint to it, and then calls the window.print() method.

Contact Us page snippet Fig 5.1.4

This is a PHP code that is used to create and display the Contact Us page of a Bus Pass Management System
website. Here are some key points:

• The code starts with <?php and ends with ?>, which are the tags that indicate the PHP script.
• The code uses include('includes/dbconnection.php') to connect to the database using a separate file
that contains the connection parameters.
• The code uses session_start() to start a session and error_reporting(0) to turn off error reporting.
• The code checks if the user has submitted the contact form by using isset($_POST['submit']). If
yes, it assigns the values of the form fields to variables like $name, $email, and $message.

Dept of ISE 12
2023-2024
ss
Railway Management System

• The code uses a SQL query to insert the user’s name, email, and message into the table tblcontact.
• The code uses $dbh->lastInsertId() to get the ID of the last inserted row and checks if it is greater
than zero. If yes, it displays an alert message that the message was sent successfully and redirects
the user to the contact page using echo and window.location.href.
• If not, it displays an alert message that something went wrong and asks the user to try again.
• The code uses HTML elements to create the layout and design of the web page, such as
headings, links, forms, and icons.
• The code also uses echo and htmlentities to print the values of the page description, mobile
number, and email from the table tblpage where the page type is ‘contactus’.
• The code also uses JavaScript libraries such as jQuery, SmoothScroll, and Jarallax to add some
effects and animations to the web page.

5.2 Backend

Back end is the term used to describe the part of a website or web application that users cannot see. It is
the part of the application where the server and database reside and the logic is built to perform
operations. It includes the main features and functionalities of the application on the server. Source

Back end developers are the experts who build and maintain the mechanisms that process data and
perform actions on websites. They use various tools, frameworks, and languages to create and connect
servers, databases, and APIs. Some of the common back end languages and tools are:

• PHP
• Python
• Java
• Node.js
• MySQL
• MongoDB
• Oracle

Role of SQL in backend development

SQL is a language that is used to communicate with databases and manipulate data. SQL stands for
Structured Query Language. In backend development, SQL plays an important role in performing various
tasks, such as:

• Querying data from databases and filtering, sorting, and aggregating it


• Joining data from multiple tables and creating views
• Implementing security and integrity rules for data access and modification

Dept of ISE 13
2023-2024
ss
Railway Management System

• Writing stored procedures and functions to automate database operations

SQL is compatible with many types of databases, such as MySQL, Oracle, PostgreSQL, and SQLite.
SQL is also widely used by data analysts and data scientists to extract and analyze data from various
sources. SQL is a powerful and versatile language that can help backend developers create and manage
data-driven applications

DB connection Fig 5.2.1


This is a PHP code that is used to connect to a database using PDO (PHP Data Objects). Here are some key
points:

• The code starts with <?php and ends with ?>, which are the tags that indicate the PHP script.
• The code uses define() to create constants for the database credentials, such as host, user,
password, and name. Constants are variables that cannot be changed once defined.
• The code uses a try block to attempt to create a new PDO object with the database credentials as
parameters. PDO is a PHP extension that provides a uniform interface for accessing various types
of databases.
• The code also passes an optional parameter to the PDO constructor, which is an array of driver-
specific options. In this case, the option is PDO::MYSQL_ATTR_INIT_COMMAND, which
specifies a command to be executed when connecting to the MySQL server. The command is SET
NAMES 'utf8', which sets the character set to UTF-8 for the connection.
• The code assigns the PDO object to a variable called $dbh, which can be used to perform database
operations.
• The code uses a catch block to handle any exceptions that may occur during the database
connection. Exceptions are errors that disrupt the normal flow of the program. In this case, the
exception is PDOException, which is a specific type of exception for PDO errors.
• The code uses exit() to terminate the script and display the error message using $e->getMessage(). The
$e variable represents the exception object that contains information about the error.

Dept of ISE 14
2023-2024
ss
Railway Management System

Backend view of created tables Fig 5.2.2

• phpMyAdmin is a popular tool for managing MySQL databases. It allows users to create, modify,
and delete databases, tables, and records using a web browser.
• The image shows the structure of a database called “buspassdb”, which contains five tables:
tbladmin, tblcategory, tblcontact, tblopage, and tblpass.
• Each table has a row count, a type, a collation, a size, and an overhead. These are the properties
that describe the characteristics and performance of the tables.
• Each table also has actions such as browse, structure, search, insert, and drop. These are the
operations that users can perform on the tables using phpMyAdmin.
• The image also shows some tabs and options at the top and bottom of the interface, such as SQL,
import, export, print, and create new table. These are the features that users can access to perform
various tasks on the database.

Dept of ISE 15
2023-2024
ss
Railway Management System

CHAPTER 6

SNAPSHOT

Fig 6.1: User Page

Fig 6.2 Check availability

Dept of ISE 16
2023-2024
ss
Railway Management System

Fig 6.3: Admin Login Page

Fig 6.4 about us

Dept of ISE 17
2023-2024
ss
Railway Management System

Fig 6.5 contact us page

Dept of ISE 18
2023-2024
ss
Railway Management System

CONCLUSION

Projects are only a humble venture to satisfy the needs to manage their project work. Severaluse friendly
coding have also adopted. This package shall prove to be a powerful package in satisfying all the
requirement of the requirements of the college. The objective of software planning is to provide a frame
work that enables the manager to make reasonable estimates made within a limited time frame at the
beginning of the software project and should be update regularly as the project progresses. It is concluded
that we have made efforts on following points

• A description of the background and context of the project and its relation to work alreadymade in the
area.

• Made statement of the aims and objective of the project.


• The description of purpose, scope, and applicability.
• We define the problem on which we are working in the project.
• We describe the requirement specification of the system and the action that can be made
onthese things.

• We designed user interface and security issues real

Dept of ISE 19
2023-2024
ss
Railway Management System

REFERENCES

1. Database systems models, Languages, Designs and Application Programs, Ramez

Elmasriand Samkant B.Navate, 6th edition, Pearson.

2. Database Management system, Rama Krishnan and Gehrke, 3rd edition, 2014, McGraw

Hill

Dept of ISE 20
2023-2024

You might also like