Professional Documents
Culture Documents
Dbms Final
Dbms Final
A
MINI PROJECT REPORT
ON
“Vehicle Service Management System”
Submitted in partial fulfilment of the requirements for the DBMS Laboratory with mini project
(18CLS58) course of the 5th semester
BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING
Submitted by,
SRIVATSA B R THEJAS I M
1JS20CS165 1JS20CS173
Under the guidance of
Mrs. K S Rajeshwari Mrs. Pooja H
Assistant Professor, Dept of CSE Assistant Professor, Dept of CSE
JSSATE, Bengaluru JSSATE, Bengaluru
CERTIFICATE
This is to certify that the mini-project work entitled "VEHICLE SERVICE
MANAGEMENT SYSTEM" is a Bonafide work carried out by Mr. SRIVATSA
BHARADWAJ R (1JS20CS165) and Mr. THEJAS I M (1JS20CS173) in partial
fulfillment for the Database Management Systems Laboratory with Mini Project
(18CSL58) of 5th semester Bachelor of Engineering in Computer Science and
Engineering of the Visvesvaraya Technological University, Belgaum during the academic
year 2022-2023. It is certified that all corrections and suggestions indicated for Internal
Assessment have been incorporated in the report deposited in the department library. The
project report has been approved as it satisfies the academic requirements in respect of
project work prescribed for the said degree.
1)…………………………………….. ……………………………………..
2)…………………………………….. …………………………………….
ACKNOWLEDGEMENT
We express our humble pranamas to His Holiness Jagadguru Sri Sri Sri Shivarathri
Deshikendra Mahaswamiji who has showered their blessings on us for framing our career
successfully.
We express our sincere thanks to our beloved principal, Dr. Bhimasen Soragaon for having
supported us in our academic endeavors.
We are thankful to the resourceful guidance, timely assistance and graceful gesture of our
guide Mrs. K S Rajeshwari, Assistant Professor, Department of Computer Science and
Engineering, and Mrs. Pooja H, Assistant Professor, Department of Computer Science and
Engineering, who has helped us in every aspect of our project work.
And last but not the least, we would be very pleased to express our heart full thanks to all the
teaching and non-teaching staff of CSE department and our friends who have rendered
their help, motivation and support.
The completion of any project involves the efforts of many people. We have been lucky
enough to have received a lot of help and support from all quarters during the making of this
project, so with gratitude, we take this opportunity to acknowledge all those who have given
guidance and encouragement thereby helping us emerge successfully.
SRIVATSA BHARADWAJ R
1JS20CS165
THEJAS I M
1JS20CS173
ABSTRACT
Owners of vehicles can avoid unforeseen vehicle problems by maintaining their vehicles
regularly. Early detection of vehicle concerns is crucial to preventing them from developing
into serious difficulties. Owners of vehicles frequently inquire about service at auto shops.
Vehicle technicians examine crucial parts of the vehicle and fix problems to make sure they
are in good condition and won't break down suddenly. The study was carried out by the
researchers to evaluate the everyday activities and transactions carried out in auto repair
facilities.
The researchers gathered preliminary data and discovered that the majority of auto repair
companies or garages still handle their daily transactions manually. Customer records are still
entered manually, as are transactions with clients, tracking of vehicle repairs as they are
made, updates on vehicle services, and billing. The functioning of the garage and the
response time to client inquiries will be slowed by the ongoing usage of manual procedures.
The researchers have identified a need to modernize how auto repair shops work. Customers
and vehicle garages will both profit from the system's installation. Utilizing the technology to
run the company will help vehicle garages expand and improve operational efficiency.
Customers may do business for vehicle service easily and comfortably.
TABLE OF CONTENTS
CHAPTER TITLE PAGE NO.
ACKNOWLEDGEMENT
ABSTRACT
TABLE OF CONTENTS
TABLE OF FIGURES
1 INTRODUCTION 1
DESIGN 3
2 2.1 ER DIAGRAM 5
2.2 RELATIONAL SCHEMA 8
SYSTEM REQUIREMENTS 10
3.1 FRONT END 10
3.2 BACK END 11
3 3.3 WEB SERVER 12
3.4 OPERATING SYSTEM 13
3.5 FUNCTIONAL AND NON-FUNCTIONAL REQ 13
3.6 CLASS DIAGRAM 28
IMPLEMENTATION 29
4.1 CODE SNIPPET 29
4.2 TABLE DESCRIPTION 33
4 4.3 COMMANDS 35
4.4 INSERTION OF TUPLES 37
4.5 QUERIES 39
4.6 TRIGGERS 45
RESULTS 48
5.1 FRONT END 48
5.1.1 CUSTOMER SIDE 48
5
5.1.2 ADMIN SIDE 51
5.1.3 STAFF LOGIN 70
5.2 BACK END 72
6 CONCLUSION 76
7 REFERENCES 79
LIST OF FIGURES
SL NO. FIG NO WITH TITLE PAGE NO
1 Fig 2.1: ER- Diagram 6
2 Fig 2.2: Relational Schema 8
3 Fig 3.1: Class diagram 28
4 Fig 5.1: Customer Side home page 48
5 Fig 5.2: Customer Side home page 48
6 Fig 5.3: Service request form 49
7 Fig 5.4: Filled request form 50
8 Fig 5.5: Prompt upon successful submission 50
9 Fig 5.6: Individual service details 51
10 Fig 5.7: Admin side features 51
11 Fig 5.8: Admin dashboard page 52
12 Fig 5.9: Editing the admin credentials 53
13 Fig 5.10: Mechanics list page 53
14 Fig 5.11: Mechanic details updating 54
15 Fig 5.12: List of mechanics 54
16 Fig 5.13: Creating new mechanics 55
17 Fig 5.14: Service request page 56
18 Fig 5.15: Viewing individual service request details 57
19 Fig 5.16: Updating status of service request 57
20 Fig 5.17: Assigning status of service request 58
21 Fig 5.18: Admin creating service request 59
22 Fig 5.19: Filtering service requests in report tab 60
23 Fig 5.20: Filtered service request in pdf format 61
24 Fig 5.21: Category list 61
25 Fig 5.22: Editing individual category info 62
26 Fig 5.23: Creating new info 63
27 Fig 5.24: List of services 64
28 Fig 5.25: Editing individual service-related info 65
29 Fig 5.26: Creating new service 66
30 Fig 5.27: List of staffs created by user 66
31 Fig 5.28: Editing individual staff related info 67
32 Fig 5.29: Creating new staff 68
33 Fig 5.30: System information maintenance 69
34 Fig 5.31: System information maintenance 69
35 Fig 5.32: Staff login page 70
36 Fig 5.33: Staff dashboard page 71
Fig 5.34: A view of database structure in
37 72
PhpMyAdmin (Back-End)
38 Fig 5.35: Structure of table named categories 73
39 Fig 5.36: Inserting new category in Front-End by admin 74
40 Fig 5.37: Updated category list in Front-End 74
Fig 5.38: Back-End Snapshot of table categories before
41 75
inserting new category in Front-End
Fig 5.39: Back-End Snapshot of table categories after
42 75
inserting new category in Front-End
Vehicle Service Management System
Chapter 1. INTRODUCTION
A database management system (DBMS) is a software application that allows users to create,
manage and maintain a database. It provides a way to store, organize and retrieve data in an
efficient and secure manner. A DBMS allows users to interact with the data using a specific
language called SQL (Structured Query Language) which enables them to perform tasks such
as inserting, updating, and retrieving data from the database. In summary, DBMS provides a
reliable and efficient way to store, manage and retrieve data, and it is widely used in various
industries like healthcare, finance, retail and more. It enables organizations to make data-
driven decisions, automate processes and improve the overall performance of their business
operations.
A vehicle service management system is a software application that helps businesses manage
their fleet of vehicles. This can include scheduling maintenance, tracking repairs, and
monitoring fuel consumption. The system can also provide valuable insights into the overall
health of the fleet, helping businesses make informed decisions about their vehicle
operations.
The system is designed to be easy to use and navigate, with a user-friendly interface that
allows users to quickly and easily access the information they need. It can also be customized
to meet the specific needs of each business, with options such as vehicle tracking, driver
behaviour monitoring, and automated reporting.
Existing vehicle service management systems typically include features such as scheduling
and appointment management, customer and vehicle information tracking, inventory and
parts management, and invoicing and billing. These systems may also include additional
Page | 1
JSSATEB – Dept of CSE
Vehicle Service Management System
features such as automated reminders for service and maintenance, and the ability to track
and analyse service and repair history.
Limitations of these systems may include a lack of integration with other systems, such as
accounting software, and limited reporting and data analysis capabilities. Additionally, these
systems may not be customizable to the specific needs of a particular business, and may not
be able to handle large volumes of data or transactions. Some older systems may be on-
premise with difficulty in scalability and remote access capability.
This project has a Public Module and Admin Module. The admin module is the side of the
project where the management manages all the data recorded/will be recorded on the system.
The admin can manage the list of vehicle categories that the shop handles and other important
and relative data for this project such as the mechanic list and service requests list. On the
admin side, this side can be managed by the 2 types of users which are the admin and the
staff whereas the staff user has only limited. On the public side, the clients can explore the
list of services does the company/shops provide. The client can submit their service request at
this side and the submitted request will be marked as pending. This simple project also
generates a date-wise printable service request report.
A vehicle service management system (VSMS) database typically stores information about a
company's fleet of vehicles, including details such as:
Maintenance schedules and history (e.g., oil changes, tire rotations, brake inspections)
A VSMS database can also include reports and analytics that provide insights into the overall
performance of the fleet, such as fuel efficiency, maintenance costs, and downtime. This
information can be used to identify trends, identify areas for improvement, and make data-
driven decisions about vehicle operations.
In summary, a VSMS database stores all the information related to the company's fleet, this
information can be useful to schedule maintenance, track repairs and monitor fuel
consumption, it also can provide valuable insights into the overall health of the fleet and help
businesses make informed decisions about their vehicle operations.
Page | 2
JSSATEB – Dept of CSE
Vehicle Service Management System
Chapter 2: DESIGN
Entity types:
An entity type is a category of objects or things represented in a database, where each
instance of the entity type is represented by a row in the table and defined by a
set of attributes
Entity set:
An entity set is a collection of all entities of a particular entity type in a database. It is
represented by a table in the database, where each row corresponds to an instance of the
entity type. An entity set can be thought of as a set of all entities of a specific type.
In our database there exists entity sets in the table categories like (1, 2 Wheeler, 1), (2, 3
Wheeler , 1), (3, 4 Wheeler, 1)
Attributes:
Attributes are characteristics or properties of an entity in a database. They are used to
describe the entity and are typically represented as columns in a table. Each attribute has a
name and a data type, such as text, numbers, date, etc. An attribute can be considered as a
descriptor of the entity.
In our database the table ‘categories’ contains attribute like (id, category, status,
date_created)
Types of Attributes:
single-valued Attributes:
Most attributes have a single value for a particular entity For eg:Age is a single-
valued attribute of a person
In our database all the attributes used are single-valued attributes
Multivalued Attributes:
An entity having multiple values for that attribute
For eg: color of a color color={black,red}
Person’s degree degree={BE, MTech, PhD}
In our database there are no multivalued attributes.
Page | 3
JSSATEB – Dept of CSE
Vehicle Service Management System
RELATIONSHIP TYPES
One-to-one: A relationship in which one record in a table is related to one and only one
record in another table.
In Fig 2.1 one service request can have only one category of vehicle
One-to-many: A relationship in which one record in a table is related to multiple records in
another table.
In Fig 2.1 one service request can have more than one service from the list of services
Many-to-many: A relationship in which multiple records in a table are related to multiple
records in another table.
In Fig 2.1 many customers can place many service requests
Self-referencing: A relationship in which a table is related to itself.
Page | 4
JSSATEB – Dept of CSE
Vehicle Service Management System
Hierarchical: A relationship in which one record in a table is related to one or more records
in the same table, creating a parent-child relationship.
Associative: A relationship in which two or more tables are related through an additional
table, also known as a join table or junction table.
Structural constraints:
Structural constraints are rules and limitations that are placed on the design and structure of a
database in order to maintain its integrity and consistency. These constraints are used to
define the relationships between tables and columns, and to ensure that data is entered and
stored in a consistent and predictable manner.
In Fig 2.1 we have a structural constraint on the table 'mechanics_list' with total participation
as participation constraint and cardinality ratio as 1 meaning only one mechanic can be
assigned for one service request.
Page | 5
JSSATEB – Dept of CSE
Vehicle Service Management System
2.1 ER-Diagram:
Page | 6
JSSATEB – Dept of CSE
Vehicle Service Management System
Step 2: For each weak entity type W in the ER schema with owner entity type E, create a
relation R, and include all simple attributes (or simple components of composite attributes) of
W as attributes. In addition, include as foreign key attributes of R the primary key attribute(s)
of the relation(s) that correspond to the owner entity type(s).
Step 3: For each binary 1:1 relationship type R in the ER schema, identify the relations S
and T that correspond to the entity types participating in R. Choose one of the relations, say
S, and include the primary key of T as a foreign key in S. Include all the simple attributes of
R as attributes of S.
Step 4: For each regular binary 1:N relationship type R identify the relation (N) relation S.
the primary key of T as a foreign key of S. Simple attributes of R map to attributes of S.
Step 5: For each binary M:N relationship type R, create a relation S. Include the primary
keys of participant relations as foreign keys in S. Their combination will be the primary key
for S. Simple attributes of R become attributes of S.
Step 6: For each multi-valued attribute A, create a new relation R. This relation will
include an attribute corresponding to A, plus the primary key K of the parent relation (entity
type or relationship type) as a foreign key in R. The primary key of R is the combination of A
and K.
Step 7: For each n-ary relationship type R, where n>2, create a new relation S to represent
R. Include the primary keys of the relations participating in R as foreign keys in S. Simple
attributes of R map to attributes of S. The primary key of S is a combination of all the foreign
keys that reference the participants that have cardinality constraint > 1. For a recursive
relationship, we will need a new relation.
Page | 7
JSSATEB – Dept of CSE
Vehicle Service Management System
Page | 8
JSSATEB – Dept of CSE
Vehicle Service Management System
Primary keys:
‘categories’: ‘id’
‘mechanics_list’: ‘id’
‘request_meta’: ‘request_id’
‘service_list’: ‘id’
‘service_requests’: ‘id’
‘system_info’: ‘id’
‘users’: ‘id’
Foreign key:
'request_id' is a foreign key in 'request_meta' which references 'id' of the table
'service_requests'
Page | 9
JSSATEB – Dept of CSE
Vehicle Service Management System
CSS: CSS (Cascading Style Sheets) is a language used to control the presentation
and layout of HTML documents. It allows developers to separate the presentation of a
webpage from its structure and content, defined in HTML. With CSS, you can control
the colors, fonts, spacing, and overall layout of a webpage, as well as add visual
effects such as hover states, animations, and transitions. CSS can be written in
separate files or included in the same document as the HTML, and it can be applied to
individual elements or groups of elements on a webpage. It's a powerful tool that
allows developers to create visually appealing and consistent designs across multiple
web pages and devices.
jQuery: jQuery is a fast, small, and feature-rich JavaScript library. It makes HTML
document traversal and manipulation, event handling, and animation much simpler
with an easy-to-use API that works across a multitude of browsers. With a
Page | 10
JSSATEB – Dept of CSE
Vehicle Service Management System
combination of versatility and extensibility, jQuery has changed the way that millions
of people write JavaScript
Ajax: Ajax (short for Asynchronous JavaScript and XML) is a set of web
development techniques used for creating interactive and responsive web applications.
It allows for the creation of dynamic web pages without the need for a page refresh.
This is achieved by using JavaScript to make asynchronous requests to a server, and
updating only the relevant parts of the page with the new data. This allows for a
smoother, faster user experience and enables web developers to create more complex
and interactive applications. jQuery provides a convenient API for making Ajax
requests, which makes it easy to use in a web development project.
PHP v8.0.7: dynamic and interactive websites. PHP is executed on the server, and
the results are sent to the browser as plain HTML. This allows PHP to handle tasks
such as reading and writing to files, sending and receiving cookies, and creating and
manipulating databases.
Page | 11
JSSATEB – Dept of CSE
Vehicle Service Management System
management system) to create dynamic and interactive web applications. PHP is also
often used for creating RESTful web services, that can be consumed by other systems.
PHP is widely supported by web hosting providers, making it easily accessible and
easy to run on a variety of platforms, including Windows, Linux, and MacOS. It's one
of the most popular server-side scripting language and has a large community support
and many frameworks built on top of it, like Laravel, CodeIgniter,
CakePHP and many more.
MySQL uses a structured query language (SQL) to manage the data in the databases,
which allows for tasks such as creating tables, inserting and updating data, and
retrieving data based on specific criteria. MySQL supports various data types
including integers, floating-point numbers, strings and date and time, and it also
supports advanced features such as stored procedures, triggers, views, and indexes
which are used to optimize the performance of data retrieval.
Page | 12
JSSATEB – Dept of CSE
Vehicle Service Management System
bundle allows developers to set up a local web server environment with the necessary
components to run PHP and MySQL-based web applications without the need for an
internet connection.
XAMPP is easy to install and use, and it is particularly popular among developers
working on WordPress, Joomla, and other PHP-based web applications. With
XAMPP, developers can test their code and see how it behaves on a live web server,
without having to upload it to a remote web server. This can save time and money,
and it also allows developers to work offline. my local webserver that has a PHP
Version 8.0.7:
Minimum Windows 7
Generating invoices
Providing a customer portal for customers to check the status of their vehicle service, check
history, and schedule service appointments
Security (e.g. protecting sensitive customer and vehicle information from unauthorized
access)
Page | 13
JSSATEB – Dept of CSE
Vehicle Service Management System
Reliability (e.g. ability to recover from system failures and ensure data integrity)
function save_category(){
extract($_POST);
$data = "";
foreach($_POST as $k =>$v){
if(!in_array($k,array('id','description'))){
if(!empty($data)) $data .=",";
$data .= " `{$k}`='{$v}' ";
}
}
if(isset($_POST['description'])){
if(!empty($data)) $data .=",";
$data .= " `description`='".addslashes(htmlentities($description))."' ";
}
$check = $this->conn->query("SELECT * FROM `categories` where `category` =
'{$category}' ".(!empty($id) ? " and id != {$id} " : "")." ")->num_rows;
if($this->capture_err())
return $this->capture_err();
if($check > 0){
$resp['status'] = 'failed';
$resp['msg'] = "Category already exist.";
return json_encode($resp);
exit;
}
if(empty($id)){
$sql = "INSERT INTO `categories` set {$data} ";
$save = $this->conn->query($sql);
}else{
Page | 14
JSSATEB – Dept of CSE
Vehicle Service Management System
}
function save_service(){
extract($_POST);
$data = "";
$_POST['description'] = addslashes(htmlentities($description));
Page | 15
JSSATEB – Dept of CSE
Vehicle Service Management System
foreach($_POST as $k =>$v){
if(!in_array($k,array('id'))){
if(!empty($data)) $data .=",";
$data .= " `{$k}`='{$v}' ";
}
}
$check = $this->conn->query("SELECT * FROM `service_list` where `service` =
'{$service}' ".(!empty($id) ? " and id != {$id} " : "")." ")->num_rows;
if($this->capture_err())
return $this->capture_err();
if($check > 0){
$resp['status'] = 'failed';
$resp['msg'] = "Service already exist.";
return json_encode($resp);
exit;
}
if(empty($id)){
$sql = "INSERT INTO `service_list` set {$data} ";
$save = $this->conn->query($sql);
}else{
$sql = "UPDATE `service_list` set {$data} where id = '{$id}' ";
$save = $this->conn->query($sql);
}
if($save){
$resp['status'] = 'success';
if(empty($id))
$this->settings->set_flashdata('success',"New Service successfully
saved.");
else
$this->settings->set_flashdata('success',"Service successfully
updated.");
}else{
$resp['status'] = 'failed';
$resp['err'] = $this->conn->error."[{$sql}]";
}
Page | 16
JSSATEB – Dept of CSE
Vehicle Service Management System
return json_encode($resp);
}
function delete_service(){
extract($_POST);
$del = $this->conn->query("DELETE FROM `service_list` where id =
'{$id}'");
if($del){
$resp['status'] = 'success';
$this->settings->set_flashdata('success',"Service successfully deleted.");
}else{
$resp['status'] = 'failed';
$resp['error'] = $this->conn->error;
}
return json_encode($resp);
}
function save_mechanic(){
extract($_POST);
$data = "";
foreach($_POST as $k =>$v){
if(!in_array($k,array('id'))){
if(!empty($data)) $data .=",";
$data .= " `{$k}`='{$v}' ";
}
}
$check = $this->conn->query("SELECT * FROM `mechanics_list` where `name` =
'{$name}' ".(!empty($id) ? " and id != {$id} " : "")." ")->num_rows;
if($this->capture_err())
return $this->capture_err();
if($check > 0){
$resp['status'] = 'failed';
$resp['msg'] = "Mechanic already exist.";
return json_encode($resp);
exit;
Page | 17
JSSATEB – Dept of CSE
Vehicle Service Management System
}
if(empty($id)){
$sql = "INSERT INTO `mechanics_list` set {$data} ";
$save = $this->conn->query($sql);
}else{
$sql = "UPDATE `mechanics_list` set {$data} where id = '{$id}' ";
$save = $this->conn->query($sql);
}
if($save){
$resp['status'] = 'success';
if(empty($id))
$this->settings->set_flashdata('success',"New Mechanic successfully
saved.");
else
$this->settings->set_flashdata('success',"Mechanic successfully
updated.");
}else{
$resp['status'] = 'failed';
$resp['err'] = $this->conn->error."[{$sql}]";
}
return json_encode($resp);
}
function delete_mechanic(){
extract($_POST);
$del = $this->conn->query("DELETE FROM `mechanics_list` where id = '{$id}'");
if($del){
$resp['status'] = 'success';
$this->settings->set_flashdata('success',"Mechanic successfully deleted.");
}else{
$resp['status'] = 'failed';
$resp['error'] = $this->conn->error;
}
return json_encode($resp);
Page | 18
JSSATEB – Dept of CSE
Vehicle Service Management System
}
function save_request(){
extract($_POST);
$data = "";
foreach($_POST as $k=> $v){
if(in_array($k,array('owner_name','category_id','service_type','mechanic_id','status'))){
if(!empty($data)){ $data .= ", "; }
}
}
if(empty($id)){
$sql = "INSERT INTO `service_requests` set {$data} ";
}else{
$sql = "UPDATE `service_requests` set {$data} where id ='{$id}' ";
}
$save = $this->conn->query($sql);
if($save){
$rid = empty($id) ? $this->conn->insert_id : $id ;
$data = "";
foreach($_POST as $k=> $v){
if(!in_array($k,array('id','owner_name','category_id','service_type','mechanic_id','stat
us'))){
if(!empty($data)){ $data .= ", "; }
if(is_array($_POST[$k]))
$v = implode(",",$_POST[$k]);
$v = $this->conn->real_escape_string($v);
$data .= "('{$rid}','{$k}','{$v}')";
}
}
$sql = "INSERT INTO `request_meta`
(`request_id`,`meta_field`,`meta_value`) VALUES {$data} ";
Page | 19
JSSATEB – Dept of CSE
Vehicle Service Management System
}
}function save_category(){
extract($_POST);
Page | 20
JSSATEB – Dept of CSE
Vehicle Service Management System
$data = "";
foreach($_POST as $k =>$v){
if(!in_array($k,array('id','description'))){
if(!empty($data)) $data .=",";
$data .= " `{$k}`='{$v}' ";
}
}
if(isset($_POST['description'])){
if(!empty($data)) $data .=",";
$data .= " `description`='".addslashes(htmlentities($description))."' ";
}
$check = $this->conn->query("SELECT * FROM `categories` where `category` =
'{$category}' ".(!empty($id) ? " and id != {$id} " : "")." ")->num_rows;
if($this->capture_err())
return $this->capture_err();
if($check > 0){
$resp['status'] = 'failed';
$resp['msg'] = "Category already exist.";
return json_encode($resp);
exit;
}
if(empty($id)){
$sql = "INSERT INTO `categories` set {$data} ";
$save = $this->conn->query($sql);
}else{
$sql = "UPDATE `categories` set {$data} where id = '{$id}' ";
$save = $this->conn->query($sql);
}
if($save){
$resp['status'] = 'success';
if(empty($id))
$this->settings->set_flashdata('success',"New Category successfully
saved.");
else
Page | 21
JSSATEB – Dept of CSE
Vehicle Service Management System
$this->settings->set_flashdata('success',"Category
successfully updated.");
}else{
$resp['status'] = 'failed';
$resp['err'] = $this->conn->error."[{$sql}]";
}
return json_encode($resp);
}
function delete_category(){
extract($_POST);
$del = $this->conn->query("DELETE FROM `categories` where id = '{$id}'");
if($del){
$resp['status'] = 'success';
$this->settings->set_flashdata('success',"Category successfully
deleted.");
}else{
$resp['status'] = 'failed';
$resp['error'] = $this->conn->error;
}
return json_encode($resp);
}
function save_service(){
extract($_POST);
$data = "";
$_POST['description'] = addslashes(htmlentities($description));
foreach($_POST as $k =>$v){
if(!in_array($k,array('id'))){
if(!empty($data)) $data .=",";
$data .= " `{$k}`='{$v}' ";
}
}
$check = $this->conn->query("SELECT * FROM `service_list` where `service` =
'{$service}' ".(!empty($id) ? " and id != {$id} " : "")." ")->num_rows;
if($this->capture_err())
Page | 22
JSSATEB – Dept of CSE
Vehicle Service Management System
return $this->capture_err();
if($check > 0){
$resp['status'] = 'failed';
$resp['msg'] = "Service already exist.";
return json_encode($resp);
exit;
}
if(empty($id)){
$sql = "INSERT INTO `service_list` set {$data} ";
$save = $this->conn->query($sql);
}else{
$sql = "UPDATE `service_list` set {$data} where id = '{$id}' ";
$save = $this->conn->query($sql);
}
if($save){
$resp['status'] = 'success';
if(empty($id))
$this->settings->set_flashdata('success',"New Service successfully
saved.");
else
$this->settings->set_flashdata('success',"Service successfully
updated.");
}else{
$resp['status'] = 'failed';
$resp['err'] = $this->conn->error."[{$sql}]";
}
return json_encode($resp);
}
function delete_service(){
extract($_POST);
$del = $this->conn->query("DELETE FROM `service_list` where id =
'{$id}'");
if($del){
$resp['status'] = 'success';
Page | 23
JSSATEB – Dept of CSE
Vehicle Service Management System
$this->settings->set_flashdata('success',"Service successfully
deleted.");
}else{
$resp['status'] = 'failed';
$resp['error'] = $this->conn->error;
}
return json_encode($resp);
}
function save_mechanic(){
extract($_POST);
$data = "";
foreach($_POST as $k =>$v){
if(!in_array($k,array('id'))){
if(!empty($data)) $data .=",";
$data .= " `{$k}`='{$v}' ";
}
}
$check = $this->conn->query("SELECT * FROM `mechanics_list` where `name` =
'{$name}' ".(!empty($id) ? " and id != {$id} " : "")." ")->num_rows;
if($this->capture_err())
return $this->capture_err();
if($check > 0){
$resp['status'] = 'failed';
$resp['msg'] = "Mechanic already exist.";
return json_encode($resp);
exit;
}
if(empty($id)){
$sql = "INSERT INTO `mechanics_list` set {$data} ";
$save = $this->conn->query($sql);
}else{
$sql = "UPDATE `mechanics_list` set {$data} where id = '{$id}' ";
$save = $this->conn->query($sql);
}
Page | 24
JSSATEB – Dept of CSE
Vehicle Service Management System
if($save){
$resp['status'] = 'success';
if(empty($id))
$this->settings->set_flashdata('success',"New Mechanic successfully
saved.");
else
$this->settings->set_flashdata('success',"Mechanic successfully
updated.");
}else{
$resp['status'] = 'failed';
$resp['err'] = $this->conn->error."[{$sql}]";
}
return json_encode($resp);
}
function delete_mechanic(){
extract($_POST);
$del = $this->conn->query("DELETE FROM `mechanics_list` where id =
'{$id}'");
if($del){
$resp['status'] = 'success';
$this->settings->set_flashdata('success',"Mechanic
successfully deleted.");
}else{
$resp['status'] = 'failed';
$resp['error'] = $this->conn->error;
}
return json_encode($resp);
}
function save_request(){
extract($_POST);
$data = "";
foreach($_POST as $k=> $v){
if(in_array($k,array('owner_name','category_id','service_type','mechanic_id','status'))){
if(!empty($data)){ $data .= ", "; }
$data .= " `{$k}` = '{$v}'";
Page | 25
JSSATEB – Dept of CSE
Vehicle Service Management System
}
}
if(empty($id)){
$sql = "INSERT INTO `service_requests` set {$data} ";
}else{
$sql = "UPDATE `service_requests` set {$data} where id ='{$id}' ";
}
$save = $this->conn->query($sql);
if($save){
$rid = empty($id) ? $this->conn->insert_id : $id ;
$data = "";
foreach($_POST as $k=> $v){
if(!in_array($k,array('id','owner_name','category_id','service_type','mechanic_id','stat
us'))){
if(!empty($data)){ $data .= ", "; }
if(is_array($_POST[$k]))
$v = implode(",",$_POST[$k]);
$v = $this->conn->real_escape_string($v);
$data .= "('{$rid}','{$k}','{$v}')";
}
}
$sql = "INSERT INTO `request_meta`
(`request_id`,`meta_field`,`meta_value`) VALUES {$data} ";
$this->conn->query("DELETE FROM `request_meta` where `request_id` =
'{$rid}' ");
$save = $this->conn->query($sql);
if($save){
$resp['status'] = 'success';
$resp['id'] = $rid;
}else{
$resp['status'] = 'failed';
$resp['msg'] = $this->conn->error;
$resp['sql'] = $sql;
}
}else{
Page | 26
JSSATEB – Dept of CSE
Vehicle Service Management System
$resp['status'] = 'failed';
$resp['msg'] = $this->conn->error;
$resp['sql'] = $sql;
}
return json_encode($resp);
}
function delete_request(){
extract($_POST);
$del = $this->conn->query("DELETE FROM `service_requests`
where id = '{$id}'");
if($del){
$resp['status'] = 'success';
$this->settings->set_flashdata('success',"Request
successfully deleted.");
}else{
$resp['status'] = 'failed';
$resp['error'] = $this->conn->error;
}
return json_encode($resp);
}
}
Page | 27
JSSATEB – Dept of CSE
Vehicle Service Management System
A class diagram is a type of diagram in software engineering that describes the structure of a
system by showing the classes, attributes, and relationships between them. The Fig 3.1
describes a class diagram for our database system.
The class diagram has six classes: categories, mechanics_list, request_meta, service_list,
service_requests, and users. Each class has a set of attributes, such as id, name, and status,
and a primary key.
Additionally, there are several foreign key relationships between the classes. For example,
the request_id attribute in the request_meta class is a foreign key that references the id
attribute in the service_requests class. Similarly, the service_type attribute in the
service_requests class is a foreign key that references the service attribute in the service_list
class.
Page | 28
JSSATEB – Dept of CSE
Vehicle Service Management System
CHAPTER 4: IMPLEMENTATION
Page | 29
JSSATEB – Dept of CSE
Vehicle Service Management System
</div>
Page | 30
JSSATEB – Dept of CSE
Vehicle Service Management System
Page | 31
JSSATEB – Dept of CSE
Vehicle Service Management System
<div class="col-sm-6">
<dl>
<dt><b>Vehicle Type</b></dt>
<dd class="pl-2"><?php echo $category ?></dd>
<dt><b>Owner Name</b></dt>
<dd class="pl-2"><?php echo $owner_name ?></dd>
<dt><b>Owner Contact</b></dt>
<dd class="pl-2"><?php echo $contact ?></dd>
<dt><b>Owner Email</b></dt>
<dd class="pl-2"><?php echo $email ?></dd>
<dt><b>Owner Address</b></dt>
<dd class="pl-2"><?php echo $address ?></dd>
<dt><b>Request Type</b></dt>
<dd class="pl-2"><?php echo $service_type ?></dd>
<dt><b>Status</b></dt>
<dd class="pl-2">
<?php if($status == 1): ?>
<span class="badge badge-primary">Confirmed</span>
<?php elseif($status == 2): ?>
<span class="badge badge-warning">On-progress</span>
<?php elseif($status == 3): ?>
<span class="badge badge-success">Done</span>
<?php elseif($status == 4): ?>
<span class="badge badge-danger">Cancelled</span>
<?php else: ?>
<span class="badge badge-secondary">Pending</span>
<?php endif; ?>
</dd>
</dl>
</div>
Page | 32
JSSATEB – Dept of CSE
Vehicle Service Management System
Page | 33
JSSATEB – Dept of CSE
Vehicle Service Management System
mechanics_list
request_meta
service_list
service_requests
Page | 34
JSSATEB – Dept of CSE
Vehicle Service Management System
system_info
users
4.3 Commands
-- Indexes for table `categories`
ALTER TABLE `categories` ADD PRIMARY KEY (`id`);
Page | 35
JSSATEB – Dept of CSE
Vehicle Service Management System
Page | 36
JSSATEB – Dept of CSE
Vehicle Service Management System
Page | 37
JSSATEB – Dept of CSE
Vehicle Service Management System
VALUES (1, 'Change Oil', 'During an oil change, the mechanic first drains it to change your
oil filter. Then, once a new filter is installed, they replace the oil in line with your
manufacturers recommendations. ', 1, '2021-09-30 14:11:21'),
(2, 'Overall Checkup', 'Engine inspection involves finding the specific symptom that the
engine gets knocking situation. Engine inspection is mainly meant for examining the overall
condition of the engine along with the parts. The main goal of engine inspection is to check
the critical components for any kind of wear and tear.', 1, '2021-09-30 14:11:38'),
(3, 'Engine Tune up', 'Today, engine tune-ups include checking, diagnosing, and replacing
bad spark plugs, spark plug wires, distributor caps, fuel filters, air filters, and oil filters. Tune-
ups can also include checking emission levels, fuel lines, wiring, coolant hoses, and
serpentine belts.', 1, '2021-09-30 14:12:03'),
(4, 'Tire Replacement', 'Step One: Get Safe. Before you exit your vehicle, you need to pull
over or find a place away from the rush of traffic on the road. ...
Page | 38
JSSATEB – Dept of CSE
Vehicle Service Management System
4.5 Queries
The below mentioned queries are all embedded in the PHP scripting language in our database
This query fetches all the tuples from the table ‘service_list’ which is
corresponding to the input id given by the user
$qry = $conn->query("SELECT * from `categories` where id = '{$_GET['id']}' ");
This query fetches all the tuples from the table ‘categories’ which is
corresponding to the input id given by the user
$qry = $conn->query("SELECT * from `mechanics_list` order by (`name`) asc ");
This query fetches all the tuples from mechanics_list and sort according to name
in ascending order
$qry = $conn->query("SELECT * from `mechanics_list` where id =
'{$_GET['id']}' ");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "mechanics_list" where the "id" column matches the value of
the "id" parameter in the $_GET superglobal array.
$mechanic = $conn->query("SELECT * FROM mechanics_list");
This query fetches all the tuples from table mechanics_list
$where = "where date(date_created) between '{$date_start}' and '{$date_end}'";
$qry = $conn->query("SELECT * from service_requests {$where} order by
unix_timestamp(date_created) desc");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "service_requests" with a where clause that filters the results
based on the "date_created" column. The where clause is constructed using the
$date_start and $date_end variables, which are used to specify a date range. The
results are ordered by the "date_created" column in descending order using the
unix_timestamp function.
$meta = $conn->query("SELECT * FROM request_meta where request_id =
'{$row['id']}'");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "request_meta" where the "request_id" column matches the
"id" column of the current row of a results set.
$services = $conn->query("SELECT * FROM service_list where id in
({$row['service_id']}) ");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "service_list" where the "id" column matches the values of the
Page | 40
JSSATEB – Dept of CSE
Vehicle Service Management System
"service_id" column of the current row of a results set. The IN operator is used to
match multiple values in the query.
$sids = $conn->query("SELECT meta_value FROM request_meta where
request_id = '{$row['id']}' and meta_field = 'service_id'")-
>fetch_assoc()['meta_value'];
$services = $conn->query("SELECT * FROM service_list where id
in ({$sids}) ");
The first query is a SELECT statement that retrieves the "meta_value" column
from the "request_meta" table where the "request_id" column matches the "id"
column of the current row of a results set, and the "meta_field" column is equal to
"service_id" The second query is a SELECT statement that retrieves all columns
from the "service_list" table where the "id" column matches the values in the
variable $sids, using the IN operator.
$qry = $conn->query("SELECT s.*,c.category FROM `service_requests` s inner
join `categories` c where s.id = '{$_GET['id']}' ");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "service_requests" as s and "categories" as c using an inner
join, where the "id" column of the service_requests table matches the value of the
"id" parameter in the $_GET superglobal array.
$meta = $conn->query("SELECT * FROM `request_meta` where
request_id = '{$id}'");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "request_meta" where the "request_id" column matches the
variable $id.
$services = $conn->query("SELECT * FROM service_list where id in
({$service_id}) ");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "service_list" where the "id" column matches the values of the
variable $service_id. The IN operator is used to match multiple values in the
query.
$user = $conn->query("SELECT * FROM users where id ='".$_settings-
>userdata('id')."'");
Page | 41
JSSATEB – Dept of CSE
Vehicle Service Management System
The query being executed is a SELECT statement that is retrieving all columns
from a table called "users" where the "id" column matches the value of the "id"
property of the object returned by the $_settings->userdata() method
$qry = $conn->query("SELECT *,concat(firstname,' ',lastname) as name from
`users` where id != '1' and id != '{$_settings->userdata('id')}' and `type` != 3 order
by concat(firstname,' ',lastname) asc ");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "users", a new column 'name' is created by concatenating the
firstname and lastname fields and displaying it as 'name' and it has a where clause
to filter the results. the clause filters the results by excluding the rows where the
"id" column is equal to 1 or the value of the "id" property of the object returned by
the $_settings->userdata() method, and where "type" column is not equal to 3.
Also, the results are ordered by the 'name' column in ascending order.
$user = $conn->query("SELECT * FROM users where id ='{$_GET['id']}'");
The query being executed is a SELECT statement that is retrieving all columns
from a table called "users" where the "id" column matches the value of the "id"
parameter in the $_GET superglobal array.
$inv = $conn->query("SELECT count(id) as total FROM categories ")-
>fetch_assoc()['total'];
The query being executed is a SELECT statement that is retrieving a count of all
the rows from a table called "categories" and returning it as a column named
"total". Then the fetch_assoc() method is used to return the result as an associative
array and the value of the total is saved into variable $inv.
$mechanics = $conn->query("SELECT count(id) as total FROM `mechanics_list`
where status = '1' ");
The query being executed is a SELECT statement that is retrieving a count of all
the rows from a table called "mechanics_list" where the status column is equal to
1, and returning it as a column named "total".
$services = $conn->query("SELECT count(id) as total FROM `service_list`
where status = 1 ");
The query being executed is a SELECT statement that is retrieving a count of all
the rows from a table called "service_list" where the status column is equal to 1,
and returning it as a column named "total".
Page | 42
JSSATEB – Dept of CSE
Vehicle Service Management System
Page | 43
JSSATEB – Dept of CSE
Vehicle Service Management System
"where" clause. The query is being executed using the "query" method of an
object stored in the "$conn" variable, and the result of the query is being stored in
the "$qry" variable.
$qry = $this->conn->query("INSERT into system_info set meta_value =
'{$value}', meta_field = '{$key}' ");
The query is using the "INSERT INTO" SQL command to insert the new row into
the table. The query is being executed using the "query" method of an object
stored in the "$conn" variable, and the result of the query is being stored in the
"$qry" variable.
Page | 44
JSSATEB – Dept of CSE
Vehicle Service Management System
appropriate syntax and using prepared statements to avoid security issues like
SQL Injection.
$del = $this->conn->query("DELETE FROM `mechanics_list` where
id = '{$id}'");
The query is using the "DELETE" SQL command to delete the row from the table
and filtering the row to delete with the "where" clause. The query is being
executed using the "query" method of an object stored in the "$conn" variable,
and the result of the query is being stored in the "$del" variable.
Page | 45
JSSATEB – Dept of CSE
Vehicle Service Management System
4.6 TRIGGERS
BEGIN
END IF;
END;
Page | 46
JSSATEB – Dept of CSE
Vehicle Service Management System
BEGIN
END IF;
END
a trigger named "check_duplicate_user_name" is being created on the "users" table, that will
execute "BEFORE INSERT OR UPDATE" on the table. It will execute the following
instructions for each row of the table: Declare a variable "duplicate_username" of type
INTEGER Set the value of "duplicate_username" to the count of rows in the "users" table
where the "username" column is equal to the "username" column of the new row being
inserted or updated. If the value of "duplicate_username" is greater than 0, then it will raise
an error with the SQLSTATE '45000' and the message 'Duplicate user name is not allowed' .
This trigger will prevent the insertion or update of a row in the "users" table if the username
column already exists in the table.
Page | 47
JSSATEB – Dept of CSE
Vehicle Service Management System
CHAPTER 5: RESULTS
Page | 48
JSSATEB – Dept of CSE
Vehicle Service Management System
Fig:5.1 and Fig:5.2 shows page which includes a basic layout of a cover picture along
with a button called “About us” which gives a brief description about the vehicle
service management agency.
Next feature is the send request button which the user can use to send a service
request to the admin side of the database.
Upon pressing the send request button, we get a small window as seen in Fig 5.3 which user
can enter details regarding fields like
Page | 49
JSSATEB – Dept of CSE
Vehicle Service Management System
User can select one or more services from the drop down.
Request type: this also includes a drop-down list of 2 elements:
o Pickup - Pick up means an agent from the service agency picks up
the customer’s vehicle
o drop-off - Dropoff means the customer itself drops off the vehicle
at the service agency location
Upon clicking submit button we get a prompt as seen in the Fig 5.5
picture.
Page | 50
JSSATEB – Dept of CSE
Vehicle Service Management System
Apart from this user can also search for a particular service and also have a look at the
description of each of the services offered by the service agency by clicking on the
name of the service the user wants to view like in Fig 5.6
User can search for a specific service by making use of search field.
This is an overall view of the features that the customers get on their side of our
database
The Fig 5.7 depicts the view of the login page of the admin side where both admin
and staff can login using the credentials provided to them (note that the credentials to
the staff are provided by the admin)
Page | 51
JSSATEB – Dept of CSE
Vehicle Service Management System
Page | 52
JSSATEB – Dept of CSE
Vehicle Service Management System
The Fig 5.10 displays a list of all mechanics with 10 entries per page (active and
inactive) with information like:
Date created: refers to the date when the mechanic joined the agency.
Name: refers to the name of the mechanic.
Page | 53
JSSATEB – Dept of CSE
Vehicle Service Management System
Contact and email: displays the contact no. and email address of the
mechanic.
Status: refers to the status of the mechanic in the agency.
Active: the mechanic is currently working in the agency.
In-active: the mechanic is currently not working in the agency.
Action: provides 2 options
o EDIT- can be used to edit the mechanic’s profile
Page | 54
JSSATEB – Dept of CSE
Vehicle Service Management System
With reference to Fig 5.13, this option lets the admin to create a new entry for a new
mechanic in the agency by entering information pertaining to fields like :
Name: name of the new mechanic
Contact: contact number of the new mechanic
Email: email address of the new mechanic
Status: provides a drop-down of 2 elements
o Active : currently active
o In-active : currenctly not active
Upon clicking the save button a new entry for the mechanic is created and the same is
updated in the backed database which can be seen in PHPMYADMIN page
Page | 55
JSSATEB – Dept of CSE
Vehicle Service Management System
The Fig 5.14 displays a list of all service requests with 10 entries per page that have
been sent from customer side with fields like
Date created : refers to the date and time when the request from the customer
has been places
Client name : refers to the customer’s name who has places the request
Service : gives the name of the services which the customer has opted for
Status : there are 5 option for status
o Pending (status code 0) : means that the service request is yet to be
viewed and action is to be taken by admin
o Confirmed (status code 1) : means that the service request is confirmed
by the admin
o On-progress (status code 2) : means that the service request is
underway and is in progress
o Done (status code 3) : means that the services opted by the customer
has been completed
o Cancelled (status code 4) : means that the admin has cancelled/rejected
the serice request
Action : this has 3 options
Page | 56
JSSATEB – Dept of CSE
Vehicle Service Management System
o VIEW : gives the service request description sent from customer side
o EDIT : the service request being assigned to a mechanic and its status
can be controlled through this option
o Assigned To: gives a drop down list of mechanics among which one of
the mechanic can be assigned for a service request.
o Status: gives a drop down list of 5 options ( as explained above )
among which the appropriate one can be chosen by the admin
Page | 57
JSSATEB – Dept of CSE
Vehicle Service Management System
o Upon clicking save request button, the service request’s state is now
successfully updated and the same gets reflected in the service requests
list and in the back end.
o DELETE: this option under Action can be used by admin to delete a
particular service request from the list of service requesets.
Apart from this we can also search for a particular request places by a customer by
entering a specific customer’s name in the search field in this tab
Page | 58
JSSATEB – Dept of CSE
Vehicle Service Management System
Instead of the customer placing from the customer side page, the admin himself can
create new service requests by using this option as seen in Fig 5.18
Upon clicking create new request option we get a window as seen above where the
details pertaining to the customer and his vehicle(as explained before) are to be
entered by the admin and also the mechanic has to assigned for that particular service
request and also status has to updated.
Upon entering all the details and clicking the save request button, this service request
which has been placed from admin side also gets reflected in the list of service
requests.
Page | 59
JSSATEB – Dept of CSE
Vehicle Service Management System
The Fig 5.19 displays a list of all service requests that have been placed in between
the dates “date start” and “date end” that can be chosen by the admin, upon clicking
the filter button, the service requests that have been placed between “date start” and
“date end” will be listed below with all related fields like:
Date time: refers to the date and time when that particular request was created
Owner name: refers to the customer who placed the request
Vehicle name: refers to the name of the customer’s vehicle which was
serviced
Registration No: refers to the regestration number of the vehicle serviced
Assigned to: refers to the name of the mechanic who was assigned this service
request
Service: refers to the services which the customer opted for
Status: the status coresponding to the service request
This tab displays all service requests irrespective of their status (whether completed or
still in progress or cancelled)
This tab helps admin in the analytics of:
number of service requests getting placed between specfic dates
number of times a customer has services his/her vehicle in his agency
between specific dates
the type of vehicles being serviced
Page | 60
JSSATEB – Dept of CSE
Vehicle Service Management System
Upon clicking PRINT button, as seen in the Fig 5.20 this tab also generates report in
PDF format that can be downloaded into the system and can be used for viewing later.
CATEGORY LIST:
Page | 61
JSSATEB – Dept of CSE
Vehicle Service Management System
The Fig 5.21 displays a list of categories of vehicles that are currently supported for
servicing in the agency with fields like:
Date created : refers to the date when a particular category was added in that
agency
Category : refers to the category/type of vehicle that can be serviced by the agency
Status : has two option
o Active : means, that particular category of vehicle servicing support is
currently active
o In-active : means, that particular category of vehicle servicing support
is currently in-active
DELETE: lets the admin delete a particular category in the list of category of
vehicles and the same will be reflected on the backend database
Page | 62
JSSATEB – Dept of CSE
Vehicle Service Management System
With reference to Fig 5.23, the create new option lets the admin to create a new
category of vehicles that the agency can service
Category name : refers to the name of the category which the admin wants to add
as a new category
Status : can be either active or inactive depending on admin’s decisions
o Active : the agency currently supports servicing of that category of
vehicles
o In-active : the agency currently doesn’t supports servicing of that category
of vehicles
Apart from these features this tab also provides a search field which the admin can use to
search for a particular category from a list of categories available
Page | 63
JSSATEB – Dept of CSE
Vehicle Service Management System
The Fig 5.24 displays a list of services that the agency currently undertakes with fields like:
Date created : refers to the date and time when a particular service was created
Service name : refers to the name of the service being offerred
Description : refers to a short description of a general procedure involved in a
particular service
Status : can be either active or inactive depending on admin’s decisions
o Active : the agency currently supports that particular service
In-active : the agency currently doesn’t support that particular service
Page | 64
JSSATEB – Dept of CSE
Vehicle Service Management System
EDIT : lets the admin change the particulars related to a specific service like
changing description, changing status.
DELETE : lets the admin remove a type of service from the list of services
and the same will be reflected in the backend database
Apart from these features, this tab also provides a search field where the admin can search for
a particular service by specifying its name
Page | 65
JSSATEB – Dept of CSE
Vehicle Service Management System
With reference to the Fig 5.26, this option lets the admin to create a new service by entering
information into fields like:
Servcie name : refers to the name of the new service which the admin wants to
add into agency
Description : refers to a short description involving a general procedure relating to
the new service being listed
Status : can be either active or inactive (as explained above)
Upon clicking save button the new service will be added on to the list of the services and the
sane will be reflected in the backend database
Page | 66
JSSATEB – Dept of CSE
Vehicle Service Management System
Apart from administrator, the staff working in the vehicle service agency can also
access the admin page but with restricted access to functionalitites
The Fig 5.27 displays a list of users who have been authorized by the admin to access
the admin page but with limited access
Admin is the one who created users in the system and provides credentials for them
for login purposes
Admin has full authoirty to either add or remove a user from the system
With reference to the Fig 5.27, this tab includes fields like:
Name : refers to name of the user who’s been given access by the admin
Username : refers to the username which that particular user should use as a
credential in order to login
Type : refers to the type of user a particular user is (type code (1) – admin and
code (2) - staff)
A user in admin side can only be either an admin or a staff
Action : provides 2 options
o EDIT : lets the admin change the information relating to a user like
name,username, password.
Upon clicking save button the edited information pertaining to a user gets reflected in
the list of users and also in the backend database
Page | 67
JSSATEB – Dept of CSE
Vehicle Service Management System
o DELETE : lets the admin remove a user from the list of users and this also
gets reflected in the backend database
With reference to Fig 5.29, this option lets admin add a new user by entering
information into fields like:
First name : first name of the new user
Last name : last name of the new user
Username : username of the new user
Password : password used to login for the new user
Login type : provides 2 choices – admin or staff
o Admin : has full access to the admin side page
o Staff : has limited access to the admin side page
Upon clicking save button the information of this new user gets inserted in the backend
database and also is reflected in the list of users in the frontend.
Page | 68
JSSATEB – Dept of CSE
Vehicle Service Management System
The Fig 5.30 and Fig 5.31 allows admin to maintain system information such as
Page | 69
JSSATEB – Dept of CSE
Vehicle Service Management System
About us : this field is used to provide description of the details pertaining to the
vehicle service agency (like location of the agency, date established, types of services
provided etc)
System logo : refers to an avatar/image that the admin can choose from his local
system and use it as trademark for representing his vehicle service agency ( this also
appears in the tab of web browsesr )
Website cover : refers to the cover pictiure which will be displayed in the customer
side and this is customisable by the admin to enhance the look of the customer side
page
Upon clicking update button in this tab the details relating to the system information
is saved in the backend database and also is reflected in the customer side page (about
us, cover page, system logo)
As we know admin has created a user named “thejas” in the Fig 5.32 who is a staff in
the agency ,
The staff named “Thejas” can now login to the admin page with limited access by
specifying his login credentials in the login page as in Fig 5.32
Page | 70
JSSATEB – Dept of CSE
Vehicle Service Management System
In the top right corner we can now see THEJAS B who has logged in as staff and not
as ADMINISTRATOR
Unllike administrator, staff has limited access to functionalities meaning, The staff
has only access to mechanic list, service requests and report.
But the staff doesn’t have access to maintainence features i.e category list, servcie list,
user list and system information which is only limited to administrator.
The staff like the admin can view the mechanic list, edit the mechanic information ,
remove a mechanic from list and also create a new mechanic.
the same functionalitites accessible by admin in case of mechanic list, service requests
and report are also accessible by staff also but the only differrence is that staff cannot
access category,service,user lists and cannot maintain system information
Page | 71
JSSATEB – Dept of CSE
Vehicle Service Management System
The Fig 5.34 illustrates how the database in created and managed in the backend by
using PHP server-side scripting language
As seen in above we have created a database named vehicle_service_db and the tables
existing in the database are as follows
Categories: contains information about categories of vehicles supported for
servicing by the agency
Mechanics_list: contains information about mechanics working in the agency
Request_meta: this table is used to store information received from a service
request form which the customer fills for placing a service request
Service_list: contains information regarding types of services provided by the
vehicle service agency
Service_requests: contains information on the service request placed by the
customer, this table is accessible by the admin and staff only
System_info: this table stores information related to the vehicle service agency
like a short description about the vehicle service agency, logo of the vehicle
service agency etc.
Page | 72
JSSATEB – Dept of CSE
Vehicle Service Management System
Users: this table stores information related to the users of the database system
i.e it contains information about the staff (user who is authorized by admin)
like username, password, name etc.
In Fig 5.35 we can have a look at the structure of the table categories where,
Id: is a primary key of type int restricted to length 30
Category: is a non-prime attribute of type varchar with length restricted to 250
Status: is also a non-prime attribute of type tinyint restricted to length 1
Date_created: is a non-prime attribute of type datetime which means it holds both
the date and time
In Fig 5.35 we can see various options like
SQL: can be used to run SQL queries in the backend
Insert: can be used to insert tuples into an existing table
Export: is used to export SQL code of the current table
Import: is used to import SQL code of a table or database
Triggers: can be used to create triggers to place restrictions on the type of data
entering the table
Page | 73
JSSATEB – Dept of CSE
Vehicle Service Management System
Apart from these features we can also have a look at the data in the tab category list
in the front end.
Page | 74
JSSATEB – Dept of CSE
Vehicle Service Management System
As seen in the Fig 5.38, before we create a new category in the front end, the contents
of category table looks like-
Fig 5.38: Back-End Snapshot of table categories before inserting new category in Front-End
We can now see in the Fig 5.39, after we create a new category ”6-wheeler” in the
front end, the contents of category table is-
Fig 5.39: Back-End Snapshot of table categories after inserting new category in Front-End
We can see in the above pictures that when we create a new category in the front end, the
same data is being sent to the backend database and being inserted into the table categories
Page | 75
JSSATEB – Dept of CSE
Vehicle Service Management System
CHAPTER 6: CONCLUSION
SUMMARY
The package was designed in such a way that future modifications can be done
easily.
The following conclusions can be deduced from the development of the project.
System security, data security and reliability are the striking features.
Limitations
Limited performance: Both PHP and MySQL can be less performant than other languages
and databases when handling large amounts of data or performing complex calculations,
particularly when dealing with high concurrency.
Limited scalability: While MySQL and PHP can handle large amounts of data, they may
not scale as well as other languages and databases in terms of handling a large number of
concurrent users or requests.
Security vulnerabilities: As with any system, if the PHP code and MySQL database are
not properly secured, there may be security vulnerabilities that can be exploited by
attackers.
Limited support for modern features: Both PHP and MySQL are older technologies and
may not have built-in support for newer technologies and features, such as machine
learning or web assembly.
Page | 76
JSSATEB – Dept of CSE
Vehicle Service Management System
Limited integration with other systems: If the system is not able to integrate with other
systems, such as inventory management or accounting software, it may be difficult to
effectively manage all aspects of the vehicle service process.
Future Enhancements
A billing system may be required for our database which may be taken up for future
enhancement.
A message notification service upon reception and completion of a service request could
be another future enhancement.
We can have a separate section for integrating with insurance agencies for covering
vehicle damages in case of vehicle accidents.
Page | 77
JSSATEB – Dept of CSE
Vehicle Service Management System
CHAPTER 7: REFERENCES
BOOK REFERENCES
Fundamentals of Database Systems, Ramez Elmasri and Shamkant B. Navathe, 7th
Edition, 2017, Pearson.
Database management systems, Ramakrishnan, and Gehrke, 3rd Edition, 2014, McGraw
Hill
Silberschatz Korth and Sudharshan, Database System Concepts, 6th Edition, Mc-
GrawHill, 2013.
WEB REFERENCES
https://stackoverflow.com/
https://www.youtube.com/
https://www.w3schools.com/php/default.asp
Page | 78
JSSATEB – Dept of CSE