Project Report
Project Report
I would like to take the opportunity to extend my sincere thanks and gratitude to
my parents for being a source of inspiration and providing time and freedom to
develop this software project.
I also feel indebted to my friends for the valuable suggestions during the project
work.
CONTENTS
1. Introduction --------------------------------------------------------------------
8. References ----------------------------------------------------------------------
INTRODUCTION
Transport management system allows the user to store the student, bus
and staff details.
This system is strong enough to withstand regressive yearly operations
under conditions where the database is maintained and cleared over a
certain span of time.
The implementation of the system in an organization will considerably
reduce data entry,type and also provide readily calculated reports.
Overall this project is developed, using python, to help maintain the School
Transport in the best way possible and to reduce human efforts and increases
convenience as well as productivity.
T
OBJECTIVES:
The aim of this project is to develop a system that can handle and manage the
activities involved in a transport in an efficient and reliable way. It aimes to
enhance the current record keeping system, which will help managers to
retrieve the up-to-date information.
The proposed software system is expected to do the following functionality-
Develop a system that can replace the manual Transport
management system.
Develop a database which stores user and student details.
Provide a user friendly environment for management activities.
The proposed system maintains all the records and transactions,
and generates the required reports and information.
Provide user-friendly interface to interact with a centralized
database based on client-server architecture.
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.
Despite of the best effort of the developer, the following limitations and functional
boundaries are visible, which limits the scope of this application software.
1. This software can store records and produce reports in pre-designed format
in soft copy. There is no facility yet to produce customized reports. Only
specified reports are covered.
2. There is no provision to calculate fine or penalty etc. for defaulter members;
however it can be developed easily with the help of adding modules.
So far as future scope of the project is concerned, firstly it is open to any modular
expansion i.e. other modules or functions can be designed and embedded to handle
the user need in future. Any part of the software and reports can be modified
independently without much effort.
SYSTEM REQUIREMENTS:
Non functional requirements:
1) Efficiency requirements-
Accessing the transport will be easier and swifter with
the implementation of the transport management system.
2) Reliablity requirements-The system should be able to
accurately perform functions related pto bus
management,students management and staff
management.
3) Usability requirements-
This sytem is designed to be user-friendly to ensure that
the users can easily and effectively perform various
tasks.
4) Implematation requirements -
The program uses python in the front -end and SQL in
the back-end.
Functional requirements:
1) student management-
This feature is used by the user to add,
display,search,delete or update a student detail .
2) Bus management-
This feature is used by the user to add,
display,search,delete or update a bus detail .
3) Staff management-
4) This feature is used by the user to add,
display,search,delete or update a staff detail.
THEORETICAL BACKGROUD
What is python?
What is MYSQL?
What is a database?
A database is a collection of information related to a particular subject or purpose,
such as tracking customer orders or maintaining a product collection. Using any
RDBMS application software like MS SQL Server, MySQL, Oracle, Sybase etc,
you can manage all your information from a single database file. Within the file,
divide your data into separate storage containers called tables. You can retrieve the
data using queries.
A table is a collection of data about a specific topic, such as products or
suppliers. Using a separate table for each topic means you can store that
data only once, which makes your database more efficient and reduces
data-entry errors. Table organises data into columns (called fields) and
rows (called records).
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 query can also update or delete multiple records at the same time, and
perform built-in or custom calculations on your data.
The MySQL Database Server is very fast, reliable, and easy to use.
If that is what you are looking for, you should give it a try. MySQL Server
also has a practical set of features developed in close cooperation with our
users. You can find a performance comparison of MySQL Server with other
database managers on our benchmark page. MySQL Server was originally
developed to handle large databases much faster than existing solutions and
has been successfully used in highly demanding production environments
for several years. Although under constant development, MySQL Server
today offers a rich and useful set of functions. Its connectivity, speed, and
security make MySQL Server highly suited for accessing databases on the
Internet.
MySQL Server works in client/server or embedded systems.
The MySQL Database Software is a client/server system that consists of a
multi-threaded SQL server that supports different backends, several different
client programs and libraries, administrative tools, and a wide range of
application programming interfaces (APIs).
The Main Features of MySQL
The DBMS interprets and processes users' requests to retrieve information from a
database. In most cases, a query request will have to penetrate several layers of
software in the DBMS and operating system before the physical database can be
accessed. The DBMS responds to a query by invoking the appropriate
subprograms, each of which performs its special function to interpret the query, or
to locate the desired data in the database and present it in the desired order.
Problem Definition & Analysis
The hardest part of building a software system is deciding precisely what to build.
No other part of the conceptual work is so difficult as establishing the detailed
technical requirement. Defining and applying good, complete requirements are
hard to work, and success in this endeavor has eluded many of us. Yet, we
continue to make progress.
Problem definition describes the What of a system, not How . The quality of a
software product is only as good as the process that creates it. Problem definition is
one of the most crucial steps in this creation process. Without defining a problem,
developers do not know what to build, customers do not know what to expect, and
there is no way to validate that the built system satisfies the requirement.
Problem definition and Analysis is the activity that encompasses learning about the
problem to be solved, understanding the needs of customer and users, trying to find
out who the user really is, and understanding all the constraints on the solution. It
includes all activities related to the following:
Identification and documentation of customer’s or user’s needs.
Creation of a document that describes the external behavior and the
association constraints that will satisfies those needs.
Analysis and validation of the requirements documents to ensure
consistency, completeness, and feasibility
Evolution of needs.
After the analysis of the functioning of a online school transport management
system, the proposed System is expected to do the following: -
To provide a user friendly, Graphical User Interface (GUI) based integrated
and centralized environment for computerized Purchasing of Products.
To provide efficient and secured Information storage, flow and retrieval
system, ensuring the integrity and validity of records.
To provide graphical and user-friendly interface to interact with a
centralized database based on client-server architecture.
To identify the critical operation procedure and possibilities of simplification
using modern IT tools and practices.
System Implementation
Table Design:
The database of School Transport management System contains 3 tables. The
tables are normalized to minimize the redundancies of data and enforcing the
validation rules of the organization. The tables and their structure are given below.
FLOW CHART OF TRANSPORT MANAGEMENT
WELCOME
MAINPAGE
STAFF BUS
DETAILS STUDENTS
DETAILS
1)DISPLAY
1)DISPLAY 1)DISPLAY
2)ADD STAFF
2)ADD BUS 2)ADD STUDENT
3)REMOVE STAFF
3)REMOVE BUS 3)REMOVE STUDENT
4) UPDATE STAFF
4)UPDATE BUS 4)UPDATE STUDENT
DETAILS
DETAILS DETAILS
Table structure: STAFF DETAILS
WELCOME PAGE:
import TransportMainPage
print("________________________________________")
print(" Welcome to Kaveryappa Transport ")
print("________________________________________")
TransportMainPage.Menu()
MAIN MODULE:
#Project on Transport Management System
#--------------------------------------------------------------------
#MODULE : TRANSPORT MANAGEMENT
import StudentDetails
import BusInfo
import StaffDetails
import os
import platform
def clrscreen():
if platform.system()=="Windows":
print(os.system("cls"))
def Menu():
while True:
print("\n\nSelect From:")
print("____________________________")
print("|\t1. Students |")
print("|\t2. Bus Info |")
print("|\t3. Staff Details |")
print("|\t4. Exit |")
print("‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\n")
op = int(input("Enter the Option : "))
if op == 1:
StudentDetails.Menu()
elif op == 2:
BusInfo.Menu()
elif op == 3:
StaffDetails.Menu()
elif op == 4:
print("\nThank you!!!")
break
else:
print("Invalid Selection\Try Again")
break
OUTPUT:
STAFF MODULE:
from mysql.connector import errorcode
from datetime import date, datetime, timedelta
from mysql.connector import(connection)
import StudentDetails
import BusInfo
import StaffDetails
import os
import mysql.connector
from mysql.connector import errorcode
from mysql.connector import(connection)
from datetime import date
import TransportMainPage
def Menu():
while True:
print
("\n\n\n=====================================================
====================================")
print ("Select Staff Menu\n")
print("_________________________________________")
print ("|\t1. Display Staff Details |")
print ("|\t2. Add Staff |")
print ("|\t3. update Staff Details |")
print ("|\t4. remove Staff |")
print ("|\t5. To main Page |")
print ("‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\n")
op=int(input("Enter the Option : "))
if op==1:
Display()
elif op==2:
Add()
elif op==3:
Update()
elif op==4:
Delete()
elif op==5:
break
else:
print("Invalid Selection")
break
def Add():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
print("Enter the following details to add a Bus")
print("===========================================")
Name=input ("Name. : ")
ID_No=input ("ID No. : ")
Route_No=input("bus route : ")
Staff_ph_number=input ("Staff ph number: ")
Qry = ("INSERT INTO StaffDetails VALUES (%s,%s,%s,%s)")
data = (Name, ID_No, Route_No, Staff_ph_number)
Cursor. execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("***New Staff Added***")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err. errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def Delete():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
ID_No=int(input("Enter Staff ID to Remove : "))
Qry =("DELETE FROM StaffDetails WHERE ID_No = %s")
del_rec=(ID_No,)
Cursor.execute(Qry,del_rec)
# Make sure data is committed to the database cnx.commit()
cnx.commit()
cnx.close()
print("***",Cursor.rowcount,"Staff Removed***")
Cursor.close()
except mysql.connector.Error as err:
if err.errno== errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno== errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def Display():
try:
os.system('cls')
cnx = connection.MySQLConnection(user='root', password='123456',
host='localhost',database='Transport')
Cursor= cnx.cursor()
query=("SELECT * FROM StaffDetails")
Cursor.execute(query)
for (Name, ID_No, Route_No,Staff_ph_number) in Cursor:
print("=================================================")
print("Name : ",Name)
print("ID_No : ",ID_No)
print("Route : ",Route_No)
print("Phone No : ",Staff_ph_number)
print("=================================================")
Cursor.close()
cnx.close()
print("***End of the List***")
except mysql.connector.Error as err:
if err.errno == errorcode. ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
else:
cnx.close()
def Update():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
ID_No=input("ID_No : ")
Route_No=input("New Route : ")
Staff_ph_number=int(input("New phone number : "))
Qry = ("UPDATE staffdetails SET Route_No=%s, Staff_ph_number=%s
WHERE ID_No=%s")
data = (Route_No, Staff_ph_number,ID_No)
Cursor.execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("***Staff Details Updated***")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err. errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
BUS MODULE:
#PYTHON MODULE BUS
import mysql
def Add():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
print("Enter the following details to add a Bus")
print("===========================================")
REGNO=input("Reg No. :")
ROUTENO=input("Route no. : ")
print("Date Registered : ")
DD=int(input("Date : "))
MM=int(input("Month : "))
YY=int(input("Year : "))
Area=input("Area : ")
busdrivername=input("Bus Driver Name : ")
Qry = ("INSERT INTO BusDetails VALUES (%s,%s,%s,%s,%s)")
data = (REGNO, ROUTENO, date(YY,MM,DD),Area, busdrivername)
Cursor. execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("***New Bus Added***")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err. errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def Delete():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
REGNO=input("Enter Reg no. to Remove : ")
Qry =("DELETE FROM BusDetails WHERE REGNO = %s")
del_rec=(REGNO,)
Cursor.execute(Qry,del_rec)
# Make sure data is committed to the database cnx.commit()
cnx.commit()
cnx.close()
print("***",Cursor.rowcount,"Bus Removed***")
Cursor.close()
except mysql.connector.Error as err:
if err.errno== errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno== errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def Display():
try:
os.system('cls')
cnx = connection.MySQLConnection(user='root', password='123456',
host='localhost',database='Transport')
Cursor= cnx.cursor()
query=("SELECT * FROM BusDetails")
Cursor.execute(query)
for (REGNO, ROUTENO,dateregistered, Area, busdrivername) in Cursor:
print("=================================================")
print("REGNO : ",REGNO)
print("ROUTENO : ",ROUTENO)
print("Date Reg : ",dateregistered)
print("Area : ",Area)
print("Bus Driver Name : ",busdrivername)
print("=================================================")
Cursor.close()
cnx.close()
print("***End of the List***")
except mysql.connector.Error as err:
if err.errno == errorcode. ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
else:
cnx.close()
def Update():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
ROUTENO=input("Reg No. : ")
Area=input("New Area : ")
busdrivername=input("New Driver Name : ")
Qry = ("UPDATE BusDetails SET Area=%s, busdrivername=%s WHERE
ROUTENO=%s")
data = (Area, busdrivername,ROUTENO)
Cursor.execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("***Bus Details Updated***")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err. errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
STUDENT MODULE:
import StudentDetails
import BusInfo
import StaffDetails
import os
import mysql.connector
from mysql.connector import errorcode
from mysql.connector import(connection)
from datetime import date
import TransportMainPage
def Menu():
while True:
print
("\n\n\n=====================================================
===========================================================
========")
print ("Select Student Menu\n")
print("________________________________________")
print ("|\t1. Display Student Details |")
print ("|\t2. Add Student |")
print ("|\t3. update Student Details |")
print ("|\t4. remove Student |")
print ("|\t5. To main Page |")
print ("‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾\n")
op=int(input("Enter the Option : "))
if op==1:
Display()
elif op==2:
Add()
elif op==3:
Update()
elif op==4:
Delete()
elif op==5:
break
else:
print("Invalid Selection")
break
def Add():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
print("Enter the following details to add a Student")
print("===========================================")
Name=input("Name :")
Admission_No=input("Admission No. : ")
Route_No=input("route No. : ")
Grade=input("Grade : ")
Qry = ("INSERT INTO StudentDetails VALUES (%s,%s,%s,%s)")
data = (Name, Admission_No ,Route_No, Grade)
Cursor. execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("***New Studen Added***")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err. errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def Delete():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
Admission_No=int(input("Enter Admission No to Remove : "))
Qry =("DELETE FROM StudentDetails WHERE Admission_No= %s")
del_rec=(Admission_No,)
Cursor.execute(Qry,del_rec)
# Make sure data is committed to the database cnx.commit()
cnx.commit()
cnx.close()
print("***",Cursor.rowcount,"Student Removed***")
Cursor.close()
except mysql.connector.Error as err:
if err.errno== errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno== errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def Display():
try:
os.system('cls')
cnx = connection.MySQLConnection(user='root', password='123456',
host='localhost',database='Transport')
Cursor= cnx.cursor()
query=("SELECT * FROM studentDetails")
Cursor.execute(query)
for (Name, Admission_No,Route_No, Grade) in Cursor:
print("=================================================")
print("Name : ",Name)
print("Admission No. : ",Admission_No)
print("Route_No : ",Route_No)
print("Grade : ",Grade)
print("=================================================")
Cursor.close()
cnx.close()
print("***End of the List***")
except mysql.connector.Error as err:
if err.errno == errorcode. ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
else:
cnx.close()
def Update():
os.system('cls')
try:
cnx =
connection.MySQLConnection(user='root',password='123456',host='localhost',data
base='Transport')
Cursor= cnx.cursor()
Admission_No=input("Admission No. : ")
Route_No=input("New Route : ")
Grade=int(input("New Grade : "))
Qry = ("UPDATE Studentdetails SET Route_No=%s, Grade=%s WHERE
Admission_No=%s")
data = (Route_No, Grade,Admission_No)
Cursor.execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("***Student Details Updated***")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err. errno== errorcode. ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
OUTPUT 1 (If choice is 1)
1. Add Staff
3.Delete Bus
4.Update Bus
5.Return To Mainmenu
OUTPUT 3 (If choice is 3)
3.Remove Student
*****