Metro System
Metro System
Updated: 13/08/18
Total number of pages: 48
M I N I P R O J E C T
Metro System Database Project
M N P R O J E C T
Preface
This project ttlee Metro System Database Project is one of the acaeemic
projects we (as a team of 2 members) take in DataBase Management System
Laboratory course (4th Sem) of Bachelor in Technology (Computer Science &
Engineering), here at Maulana Azae Natonal Insttue of Technology, Bhopal. This
project was startee in February 2018 ane merely enes at the submission eate by
April 13. (Work in of eays)
The founeatons of project startee in January 18, when new session starts ane
topic of project eecieee. Some points such that project management, scalability, risk
analysis, version control, aims, etc. were eiscussee primarily. The major aims set at
beginning of this project was -
Althrought the aims were set primarily ane broaely, we as a team collaborate
on multple issues ane try as much as we can to be stck on aims along with healthy
communicaton from supervisors. This eocument is neither a fully formal
eocumentaton nor a research basee report, but it inherits many atributes of both in
it. Here are some highlights of the project -
Most of the collectee contents are properly referencee*. If any of work is not,
please feel free to notfy us at ithub.com or via emails.
It is also plannee to place this project on itHub.com soon, where the version
control of project is monitoree properly ane subject experts (actually everyone) will
get authority to analyse, evaluate, ane even collaborate on this project. This project
will be licensee uneer Creatve Commons ShareAlike Non-eistributon 4.0
Internatonal licence 2018. From sofware engineering practce we know Sofware
prototype maintainance never enes as no sofware built is perfect, so the
moeiicatons to the irst version/release of this project will be completely to github.
Checkout the reaeme.me ile at ithub. Althrough we are saying output as a
sofware, it might not be a fully functonal SOFTWARE. We can say it as a working
prototype of sofware which can further be enhancee in form of a sofware.
It was very memorable to work on such a project with such a team ane such a
mentor. No work is perfect, remember to write your views to us! Healthy critsm,
suggestons, feeeback, ane even your opinions are always welcome to enhance this
project either at github.
7
Acknowledgements
With eue respect, we express our eeep sense of grattuee to our respectee
ane learnt guiee, cooreinator, supervisor, instructor Prof. Sweta Jain, for her valuable
help ane guieance. We are thankful for the encouragement ane motvaton that she
has given us in completng this project successfully. Her rigorous evaluaton ane
constructve critsm was of great assistance. It is imperatve for us to menton the
fact that this project coule not have been accomplishee without the perioeic
suggestons ane aevice of our supervisor.
We are also grateful to our respectee eirector Dr. Narenera Raghuvanshi for
permitting us to utlize all the necessary facilites of the college.
We woule also like to express our eeep appreciaton towares our family
members for making us such kine to eo ‘more’ by provieing the much neeeee
support ane encouragement from all aspects of life. At last, we recall our grattuee to
the one eternal almighty: The oe.
8
Contents
i. Preface.................................................................................................................................5
ii. Acknowleegements..........................................................................................................7
iii. Contents..............................................................................................................................9
iv. Abstract............................................................................................................................11
2. Literature Survey............................................................................................................17
2.1 Databases.............................................................................................................17
2.2 Structuree Query Language.............................................................................18
3. Problem Statement........................................................................................................20
3.1 Problem Statement.............................................................................................20
3.2 Problem (Task) eescripton ane major tasks..................................................20
3.2.1 Project aspects.........................................................................................20
3.2.2 Tasks...........................................................................................................21
5. Methoeology usee.........................................................................................................23
5.1 Methoeology........................................................................................................23
6. Design framework..........................................................................................................24
6.1 Entty relatonship eiagram...............................................................................24
6.2 Entty relatonship eiagram (Preliminary).......................................................25
6.3 Sequence eiagram...............................................................................................26
6.4 Architecture eiagram..........................................................................................27
6.5 Data flow eiagrams.............................................................................................28
6.6 Use-Case eiagrams.............................................................................................29
10
7. Implementaton..............................................................................................................30
7.1 Coeing...................................................................................................................30
7.2 Implementaton Snapshots...............................................................................30
8. Testng...............................................................................................................................41
8.1 Proceeure..............................................................................................................41
8.2 Outcomes.............................................................................................................41
Appeneices
Abstract
A Metro System is one which helps us to maintain an organisatonal eata
regareing a metro system. Since it is very eifcult to maintain a recore of eata items
ane this informaton manually or in ile system, we are creatng a eatabase for the
complete management of resources ane tasks of metro system. A Metro System
eatabase is one which is usee for operatonal ease in place of traeitonal ile system or
Excel worksheets for informaton storage ane retrieval with customizee user queries
implementee in SQL ane is a fully functonally requiree sofware prototype with
proper user interface ane some raneom sofware engineering staneares. Organising
eatabase for eata collecton ane retrieval helps us to maintain eata easily. We eesign it
with the help of Entty-Relatonship eiagram, UML eiagrams, eata flow eiagrams, ane
using tables & proper User interfaces. It consists of several steps to be followee ane
many webpages are to be maintainee simultaneously. It is a working prototype of a
eatabase schema which can further be enhancee. The usage of staneare webpages in
HTML, CSS, JavaScript, PHP helps us to take project online without much
moeiicatons.
Chapter 1
ntroduction & Quick review
Introeucton
A Metro System eatabase is one which is usee for operatonal ease in place of
traeitonal ile system or Excel worksheets for informaton storage ane retrieval with
customizee user queries implementee in SQL ane is a fully functonally requiree sofware
prototype with proper user interface ane incorporatng raneom sofware engineering
staneares.
✔ Working prototype of a sample metro system with user interfaces ane some queries
✔ Documentaton | Project report
Scope :
Sort of Yes. The work proeuct output of this project is a ‘sofware’e working properly
in low scalability ane is properly testee on basic functonalites, which is to be incorporatee
in that. An engineering approach is usee for buileing that sofware that incluees irst eeine
problem, analyze it, eesign it, implement it, test it, ane regularly moeify it. Technically the
proeuct output of this project is a eemo prototype.
14
Technical issues :
• Risk analysis
• Cost estmaton
• Time scheeuling
• Project monitoring ane controlling
Chapter 2
Literature Survey
Databases
Parameter Descripton
Moeern relatonal eatabase management system programs use a
Data Access
programming language known as structuree query language to
access, upeate, ane eelete eata within its tables. These programs,
inclueing Microsofts SQL Server ane the open-source MySQL
systems, allow outsiee programs to access its eata via SQL queries.
For instance, a web site can eisplay proeuct eata, inclueing photos,
prices ane eescriptons, when the web server sofware connects to
the eata containee in the relatonal eatabase management system.
The uses of SQL incluee moeifying eatabase table ane ineex structurese aeeing,
upeatng ane eeletng rows of eatae ane retrieving subsets of informaton from within a
eatabase for transacton processing ane analytcs applicatons. Queries ane other SQL
operatons take the form of commanes writen as statements -- commonly usee SQL
statements incluee select, aee, insert, upeate, eelete, create, alter ane truncate.
SQL became the ee facto staneare programming language for relatonal eatabases
afer they emergee in the late 1970s ane early 1980s. Also known as SQL eatabases,
relatonal systems comprise a set of tables containing eata in rows ane columns. Each
column in a table correspones to a category of eata -- for example, customer name or
aeeress -- while each row contains a eata value for the intersectng column.
An ofcial SQL staneare was aeoptee by the American Natonal Staneares Insttute
(ANSI) in 1986 ane then by the Internatonal Organizaton for Staneareizaton, known as
ISO in 1987. More than a half-eozen joint upeates to the staneare have been releasee by
the two staneares eevelopment boeies since thene as of this writng, recent version is
SQL:2011, approvee that year.
Both proprietary ane open source RDBMS built aroune SQL are available for use by
organizatons. They incluee MS SQL Server, Oracle Database, IBM DB2, SAP HANA, SAP
Aeaptve Server, MySQL (now ownee by Oracle) ane PostgreSQL. However, many of these
eatabase proeucts support SQL with proprietary extensions to the staneare language for
proceeural programming ane other functons. For example, Microsof ofers a set of
extensions callee Transact-SQL (T-SQL), while Oraclets exteneee version of the staneare is
19
PL/SQL. As a result, the eiferent variants of SQL oferee by veneors arentt fully compatble
with one another.
SQL commanes are eivieee into several eiferent types, among them eata
manipulaton language (DML) ane eata eeiniton language (DDL) statements, transacton
controls ane security measures. The DML vocabulary is usee to retrieve ane manipulate
eata, while DDL statements are for eeining ane moeifying eatabase structures. The
transacton controls help manage transacton processing, ensuring that transactons are
either completee or rollee back if errors or problems occur. The security statements are
usee to control eatabase access as well as to create user roles ane permissions.
20
Chapter 3
Problem Statement
Problem Statement
The major task is to prepare a fully functonal eatabase system prototype (with user
interfaces) for a metro network (quite similar to Ineian Metro lte./Ineian Railways) which
will be implementee as a working open source prototype/project (hostee at itHub)
preparee with the help of staneare sofware engineering techniques, sofware project
management guieelines, proper eocumentaton & report preparaton, etc. using various
platorms [LibreOfce Base ane MySQL Workbench for eatabase preparatatonn] using
CASE tools such as LibreOfce Writer for eocumentaton ane eiagram eesigning. User
Interfaces are built in form of webpages using HTML, CSS, JavaScript, PHP for proper
haneling of user queries ane eata entrance.
Train No.
Staton No.
Reservaton ID
Passenger ID
Departure Time
21
Train Type
Fare ane Distances
Source – Destnaton, etc.
Most of the above atributes are taken into account for project problem ane are properly
incorporatee in relatonal moeel eesign of project ane in Entty-Relatonship eiagram. See E-R
eiagram.
Tasks :
Chapter 4
Software and aardware reuuirements
Minimum System/Sofware/Hareware requirements :
Resources Usage :
Functonal requirements :
Performance requirements :
Chapter 5
Methodology used
Methoeology
We’ve ofen usee many Sofware engineering principles in the project to make it well
organisee, formal, ane more proeuctve. Use of Open-Source tools helps us to contribute
Free sofware founeaton ane Open-source community. We’ve moeellee the project
structure into various eiagrams such as Entty-Relatonship eiagrams, Use-Case eiagrams,
Sequence eiagrams, Data flow eiagrams. An Architecture eiagram is also eesignee for an
overview of eatabase proceeure insiee the system ane the interconnecton of network
between Client ane Server.
24
Chapter 6
Design framework
Entty-Relatonship eiagram:
Sequence eiagram :
27
Use-Case eiagrams :
30
Chapter 7
mplementation
Coeing
Coeing is mainly eone in Structuree Query Language (SQL) for MySQL Commane
Line Client for customisee queries. The Coees of HTML, CSS, JS, ane PHP are formatee,
uneerstaneable, customizable, ane moeiiable. We can combine other functonalites using
these coees since there we kept a margin for reusability. Check out Implementatonal
snapshots for a view of coees.
Also Check out Appeneix-B for runnable coees of sample queries in SQL.
Implementatonal Snapshots
Front-ene Webpages
35
Back-ene Coees
36
39
Chapter 8
Testing
Proceeure
The proceeure of testng of SQL coees usee is quite simple, staneare, efectve. The
steps usee in complete testng proceeure is shown below-
Outcomes
Chapter 9
Conclusions and future Scope
Conclusions:
We keep our project small ane simple which lee to some major improvements in
costs, eforts, ane tme usage in complete life cycle of project eevelopment. We’ve triee to
incluee all major functonalites which must be there in a metro/railway system eatabase
but stll it is far behine than a practcal working sofware. It requires large number of
atributes their manipulaton ane maintainance. We’ve completee major objectves of our
project ane the project is now in its maintainance phase which will contnue at ithub
where it will be proper version controllee ane is properly maintainee by subject experts,
reviewers, stueents, etc.
We hae not built RMMM plan for every risk insteae we take look at each ane every
feasible risk in eevelopment proceeure, ane simple eliminate it by whatsoever reasons.
In near future the usage of eatabases will probably be eecreasee eue to huge
sources of eata ane new technologies such as Big eata analytcs which will further improve
the erawbacks of eatabase management system.
The project output can be usee as raw input to a bigger project which may lee to
practcal implementaton of various concepts ane eebugging. This can be enhancee much
on following points-
1. User Interface:
• It can be portee to a simple applicaton using aneroie stueio/iOS buileer
which can then be publishee on Play Store, or iOS Store.
• It can be reconstructee by raphics programming user Java Swing, Java awt,
or Python Tkinter for web applicatons.
2. Implementaton:
43
• It can be implementee using Oracle eatabase 12C, DB2, PostgreSQL,
MongoDB. LibreOfce is currently using HSQLEmbeeeee as embeeeee
eatabase, insteae of which other eatabases can be usee as per requirements.
• The relatonal schema for Metro System can also be implementee on Object
Orientee eatabase which has its own pros ane cons.
3. Methoeology: We’ve usee simple yet hybrie methoeology for customizaton of events in
eevelopment of out project.
• Agile methoeology can be usee completely which will take the performace of
project eevelopment at high level.
• Extreme Programming practces ane actvites can also be usee in Project
eevelopment life cycle which has its own further improvements.
4. Staneares: We’ve simply usee unorganizee guieelines ane eevelop project using raneom
sofware staneares.
• Insteae of raneom sofware staneares we can use organisee ISO
(Internatonal staneares organisaton) staneares ane guieelines such as ISO
9001-2008.
• Capability Maturity Moeel (CMM) uieelines can be usee in organisee
manner in at least level-3.
• Six Sigma certicaton aspects can also be incorporatee in project
eevelopment.
44
Appendix A
List of tables, forms, and uueries
List of tables
List of web-pages
1. front.php
2. booking.php
4. signup.php
5. login.php
6. cancel.php
46
4. To ine names of all employees having salary greater than all other employess
5. To Fine out train which enes at Ineore ane having remaining seats at least 1
Appendix B
SQL code for sample uueries
1. To ine all users with their eetails
SELECT *
FROM "users"e
SELECT *
FROM "Trains"
WHERE "FromStaton" LIKE tBhopalte
4. To ine names of all employees having salary greater than all other employess
5. To Fine out train which enes at Ineore ane having at least 1 seat unreservee
SELECT *
FROM "Trains"
WHERE "EneStaton" = tIneoret ane "SeatsRemaining">=1e
Appendix C
Critsm ane Expert reviews
To be writen soon...