Vehicle Management System Project Report
Vehicle Management System Project Report
Submitted by:
[Link] Teja - 237Z1A1243
Shaik Sami - 237Z1A12254
[Link] - 237Z1A1256
Academic Year:2023-2027
CERTIFICATE
The project work is original and has not been submitted elsewhere
for any other degree or diploma.
DECLARATION
Submitted by:
[Link] Teja - 237Z1A1243
Shaik Sami - 237Z1A12254
[Link] - 237Z1A1256
Date:
03 July,2025
I would like to express my sincere thanks to all those who supported
me in completing this project. I am grateful to my guide
[Link] (Assistant professor) for their invaluable advice,
guidance, and encouragement.
My thanks also go to the Head of Department, my classmates, and
my family for their
continuous moral support and motivation throughout the
project.
The Vehicle Management System is a database-driven application
designed to streamline and automate the management of vehicles within
an organization or a fleet-based business. The system provides a
centralized platform for storing, accessing, and managing data related to
vehicles, drivers, maintenance schedules, and usage history. The primary
objective is to enhance operational efficiency, reduce manual errors, and
ensure timely servicing and regulatory compliance.
This project utilizes a relational database management system (RDBMS)
such as MySQL, PostgreSQL, or Oracle to maintain structured data. Core
entities in the database include vehicles, drivers, assignments, service
records, fuel logs, and insurance details. The system supports CRUD
(Create, Read, Update, Delete) operations for all major components and
ensures data integrity through the use of foreign keys, normalization, and
constraints.
The Vehicle Management System is beneficial for transport companies,
government fleets, rental services, and any organization that requires
structured vehicle tracking. By using a DBMS as the backend, the system
ensures scalability, security, and efficient data retrieval, making vehicle
management more systematic and less error-prone.
1. Introduction
1.1 Requirements
1.2 Existing System
1.3 Proposed System
1.4 Entities
1.5 Relations
2. E-R Model
3. Relational Model
8. Conclusion
al
ensnheest
Grupsthetthtas
NALLA NARASIMHA REDDY Acredias
br
SCHOOL OF ENGINEERING
Project Report
Submitted
to
[Link].
Asst Professor.
DESIGN OF ER-MODEL;
premiu dervice id
nsuranceid provider vehicle
m id
insurance
service record
has
ehicleid has service date ER-
DIAGRAM
enddae cost
start date
ownerid description
address
name
make
year divenb
name owner vehicl driver driverid
e )
engne number
ownedb
vehicle id
chasssnumhb phone
phone emai license number
l
Phone VARCHAR(15)
->
>)
Query Ok,o rows affected(0.02 sec)
mysql>
mysql>--Describe Table:Driver
mysql>DESC Driver;
------
-- -
rows in set(0.00 sec)
TABLE Owner(
mysql>CREATE
-> OwnerID INT PRIMARY KEY,
-> Phone VARCHAR(15)UNIQUE,
-> Email VARCHAR(50),
-> Address TEXT NOT NULL
->)
Query ok,o rows affected(0.04 sec)
mysql>
mysql>--Describe Table:Owner
Query Ok,0 rows affected(0.00 sec)
+----- YES N|
YES
NO NUL
mysql>--Create Table:Insurance
Query OK,0 rows affected(0.00 sec)
>
>
VehicleID INT,
-> Provider VARCHAR(50),
->
StartDate DATE,
一>
->
EndDate DATE,
- Premium DECIMAL(10,2),
>) FOREIGN KEY(VehicleID)REFERENCES Vehicle(VehicleID)
Query
Ok,o rows affected(0.02 sec)
mysql>
mysql>--Describe Table:Insurance
Query Ok,0 rows affected(0.00 sec)
mysql>DESC Insurance;
+------- -
十
——- 一
mysql>--Create Table:ServiceRecord
Query Ok,o rows affected(0.00 sec)
mysql>CREATE
TABLE ServiceRecord(
->
->
VehicleID INT,
ServiceDate DATE,
Description TEXT,
-> Cost DECIMAL(10,2),
->) FOREIGN KEY(VehicleID)REFERENCES Vehicle(VehicleID)
Query ok,0 rows affected(0.03 sec)
mysql>
mysql>--Describe
Table:ServiceRecord
Query OK,0 rows
affected(0.00 sec)
mysql>DESC ServiceRecord;
十一———- 一十————
ServiceID int NO P NU
RT
VehicleID int YES M NULL
U
L
ServiceDat date YES NULL
e
Description text YES NULL
Cost decimal(10,2) YES NULL
5 rows in set(0.00 sec)
mysql>CREATE TABLE Vehicle(
VehicleID INT PRIMARY KEY,
-> Model VARCHAR(30),
-2 Make VARCHAR(30),
-> Year INT CHECK(Year >=1990),
-> Color VARCHAR(20),
->
EngineNumber VARCHAR(30)UNIQUE NOT NULL,
-
> ChassisNumber VARCHAR(30)UNIQUE NOT NULL
->):
Query Ok,0 rows affected(0.02 sec)
mysql>
mysql>--Describe Table:Vehicle
Query ok,θ rows affected(0.00 sec)
mysql>DESC Vehicle;
VehicleID int NO PR N ]
mysql>
mysql>--Describe Table:Registration
mysql>DESC Registration;
十一
NSERT:
mysql>--INSERT INTO Owner
Query Ok,0 rows affected(0.00 sec)
mysql>INSERT
INTO >(1,'Manoj Owner VALUES
->(2,'Dhanush Shivagalla','9876543210','[Link]','Hyderabad'),
>(3,'Raju
Kumar','9765432190','[Link]','Chennai'),
Mude','9654321980','[Link]','Bangalore'),
Query Ok,5 Sharma','9543219870','sunny@[Link]','Mumbai'),
rows Yada,9432198760,[Link],Dethi)
affected(0.01 sec)
Records:5 Duplicates:0 Warnings:0
mysql>
mysql>
mysql>--View Driver Table
十———— — —
+
-
-------+ OwnerI RegNum RegDate ExpiryDa
VehicleI D ber te
RegI D
D
———-
>(401,101,'HDFC Ergo','2024-01-01','2025-01-01',8000.00),
>(402,102,'ICICI Lombard','2023-06-01','2024-06-01',7500.00),
>(403,103,'Bajaj Allianz','2024-03-10','2025-03-10',8200.00),
>(404,104,'Reliance General','2024-04-15','2025-04-15',8800.00),
->(405,105,'Tata AIG','2024-05-05','2025-05-05',9100.00);
Query Ok,5 rows affected(0.00 sec)
Records:5 Duplicates:0 Warnings:0
mysql>
mysql>--View Insurance Table
UPDATE:
mysql>--Update Owner's city
Query Ok,0 rows affected(0.00 sec)
ss
m ysql>UPDAT E Owner S E Addr e 'Pune'WHERE OwnerID =1;
Qu ery O k, 1 row affecte (004 sec
Rows matched:1 Changed:1 Warnings:0
mysql>
RENAME:
>- Con
q
Re na e c ol u mn'Ph e!to'
yus l ctNumber'in Owner table
e ryOK rows af fec t ed 00 se
DELFTF;
mysql>--[Link] Operation
Query OK,0 rows affected(0.00 sec)
mysql>
mysql>--View Driver table after deletion
Query Ok,0 rows affected(0.00 sec)
>(1,'Manoj Reddy',28,'[Link]','IT',50000),
->(2,'Santosh Reddy',35,'[Link]@[Link]','HR',45000),
→(3,'Shiva Mohith',40,'[Link]',DEFAULT,60000);
mysql>
mysql>SELECT *FROM Employee;
CHECK PCONSTRAINT:WITH
A
lo
UPDATE:
al
m TE ary =9 00 WHE RE 1;
s l U D S 0 Em I D
E R 3819(EHm 0 e):CShEeTck con st ra int 'emplo y ee c k 2 s violated.
_ _
FINAL
STATE:
4 |
SUM;
+-----------------+
SUM(Salary)AS TotalSalaryPaid FROM Employee;
mysql>SELECT
I TotalSalaryPaid
+-------- |
---+
185000.00|
AVG:
+----------- ---+
eSalary FROM Employee;
mysql>SELECT
l AverageSalaryAVG(Salary)AS
| Averag
+---------------+
+---------------+
1 46250.000000 |
MIN:
mysql> SELECT MIN(Salary)AS LowestSalary FROM Employee;
--
-- -+
LowestSalar
+---
30000.00
MAX:
MAX(Salary)AS HighestSalary FROM Employee;
mysql>SELECT
l HighestSalary I
60000.00|
1 row in set(0.00 sec)
GROUP BY:
mySgl>SELECT
一 >
Department,
一 COUNT(*)AS NumEmployees
>
一 SUM(Salary)AS TotalSalary,
>
IT
1 50000.00 50000.000000
HR 1
General
45000.00 45000.000000
1 60000.00
60000.000000
NULL 1 30000.00
30000.000000
4 rows in
mysql>SELECT
-> Department,
-> COUNT(*)AS NumEmployees,
-> sum(Salary)AS TotalSalary,
-> AVG(Salary)AS AvgSalary
->FROM Employee
->GROUP BY Department
->HAVING AVG(Salary)>45000;
IT 1 50000.00 |50000.000000
General 1 60000.00 60000.0000
00
VIEWS:
CREATE VIEW:
mysql>CREATE VIEW View_EmployeeSummary AS
->SELECT
->
EmpID,
-> Name
->
Department,
-> Salary
->FROM Employee
Query Ok,o rows affected(0.01 sec)
mysgl>
mysql>--View the data in the created view
query OK,0 rows affected(0.00 sec)
UPDATE VIEW:
mysql>UPDATE View_EmployeeSummary
->SET Salary =48000
->WHERE EmpID =2;
Query Ok,1 row affected(0.00 sec)
Rows matched:1Changed:1 Warnings:0
mysql
nysgl>--View
> again to confirm update
Query Ok,0 rows affected(0.00 sec)
1 |Manoj Reddy L
4 rows in set(0.00 sec)
2 |Santosh
Reddy 3 |Shiva DROP VIEW:
Mohith
8 |Null Department
NULL
IT 50000.00
HR
48000.00
General 60000.00
30000.0o
>DROP VIEW
mysql
View_EmployeeSummary; Query Ok,0
TRIGGERS:
mysql>CREATE TABLE AuditLog(
一 >
ter_employee_insert
->AFTER INSERT ON Employee
mysql>CREATE TRIGGER af AuditLog(ActionType,Description)
->FOR EACH ROW
->BEGIN INSERT',CONCAT('Inserted employee:',[Link]));
INSERT INTO
-> VALUES('AFTER
BEFORE UPDATE:
mysql>CREATE TRIGGER before_employee_update
AFTER JPDATF;
T RIG ER a fte
C REAT
mysql> E G _update
->A FTER UP D A TE ON Emplo
->FOR EACH ROW
->
-
一 >
VALUESC'AFTER UPDATE',CONCAT('Updated employee:',[Link]));
BEFORE DELETE:
T RIGG R b ore
C REATE
mysql> E delete
->B EFORE DELETE O N E plo
->FOR EACH ROW
- BEGIN
>END INSERT INTO AuditLog(ActionType,Description)
> VALUES C'BEFORE DELETE',CONCAT('Deleting employee:',[Link]));
-
DELETE:
mysql> C REATE TRIGGE R a f t e employee_delete
->A FTER DELETE ON Emplo e
->FOR EACH ROW
-> EGIN
>
一 INSERT INTO AuditLog(ActionType,Description)
VALUESC'AFTER DELETE',CONCAT('Deleted employee:',[Link]));
-
->END;
>$$
Query OR,0 rows affected(0.01 sec)
INSERT:
ge,Email,Department,Salary)
mysql>INSERT 29,'[Link]','Development',52888);
Query ok,1 rowINTO Employee(EmpID,Name,A
affected(0.01 sec)
SAMPLE UPDATE:
Employee
mysql>UPDATE
->SET
>W
Salary
Em
=58000
D
SAMPLF DELETE:
oyee
mysql>DELETE FROM Empl
D
>WHE EmpI =1 ;
Que y O 1 row affecte (0.00
TRIGGER LOGS:
mysql>SELECT *FROM AuditLog ORDER BY ActionTime DESC;
十 ----- 一 一
十
个
PROCEDURE ShowEmployeeDetails()
个
个 BEGIN
个
mysql>CREATE
DECLARE done INT DEFAULT FALSE;
个
个 DECLARE V_Salary DECINAL(10,2);
个
OPEN emp_cursor;
CALLTHE PROCEDURE:
mysql>CALL ShowEmployeeDetails();
|EmployeeDetails
+
+---------------------
+---------------------
|EmployeeDetails
+----------------------- ----------------------
+---------------------
I EmployeeDetails
—-——-
+----------------------
------------------ -
EmployeeDe--ails
-------------- ---- ——— 一