You are on page 1of 28

Car Rental Management System 2020-2021

CHAPTER 1

INTRODUCTION

1.1 INTRODUCTION TO CAR RENTAL SYSTEM:

The main objective of the application car Rental System require a temporary vehicle, for
example those who do not own their own car, or owners of damaged or destroyed vehicles who
are awaiting repair or insurance compensation or travelers who are out of town.

A car rental, hire car, or car hire agency is a company that rents
automobiles for short periods of time, generally ranging from a few hours to a few weeks. It is
often organized with numerous local branches (which allow a user to return a vehicle to a
different location), and primarily located near airports or busy city areas and often complemented
by a website allowing online reservations. Car rental agencies primarily serve people who
require a temporary vehicle, for example, those who do not own their own car, travelers who are
out of town, or owners of damaged or destroyed vehicles who are awaiting repair or insurance
compensation. Car rental agencies may also serve the self-moving industry needs, by renting
vans or trucks, and in certain markets, other types of vehicles such as motorcycles or scooters
may also be offered. Alongside the basic rental of a vehicle, car rental agencies typically also
offer extra products such as insurance, global positioning system (GPS) navigation systems,
entertainment systems, mobile phones, portable Wi-Fi and child safety seats.

Dept. of CSE, AIT Bengaluru 1


Car Rental Management System 2020-2021

CHAPTER 2

SPECIFICATIONS

2.1 HARDWARE REQUIREMENTS:

Client side:

 PROCESSOR : 1.0 GHZ


 RAM : Minimum 512 MB
 HARD DISK : 16 GB

Server side:

 PROCESSOR : Intel Pentium or Higher Version


 RAM : Minimum 2 GB
 HARD DISK : 60 GB

2.2 SOFTWARE REQUIREMENTS:

Client side:

 Web Browser :Any compatible browser


 Operating System : Windows or any equivalent OS

Server side:

 Web Server : APACHE


 Server side Language : PHP
 Database Server : MYSQL
 Web Browser : Google Chrome or any compatible browser
 Operating System : Windows or any equivalent OS

Dept. of CSE, AIT Bengaluru 2


Car Rental Management System 2020-2021

2.3 FUNCTIONAL REQUIREMENTS

● View all available rental cars: Connects with the database through php to call all car objects
and display them accordingly

● Select their desired rental cars: Click on the desired car for booking

● Allow for booking: Booking page will appear

● Allow the customer to log in: log in display form

● Allow the customer to signup: signup display form

● Allow the user select and provide a payment type: Display form - with options for typical card
information - type, number, code on back, month, year etc.

● Authenticate any user logging in: communicates with the database to verify the inputted
username and password is correct

● Allow administrators to change what cars are available for rent: Administrators will log in
through the log in display form such as customers would, but would have a different looking
interface to allow for them to add and remove options.

● Allow administrators to add cars: Administrators can add new cars through admin login

● Allow administrators manage contact us query

●Admin Can Check All registered user’s details

Dept. of CSE, AIT Bengaluru 3


Car Rental Management System 2020-2021

2.4 NON FUNCTIONAL REQUIREMENTS

Non-functional requirements, as the name suggests, are requirements that are not directly
concerned with the specific services delivered by the system to its users. They may relate to
emergent system properties such as reliability, response time, and store occupancy.
Alternatively, they may define constraints on the system implementation such as the capabilities
of I/O devices or the data representations used in interfaces with other systems. Non-functional
requirements, such as performance, security, or availability, usually specify or constrain
characteristics of the system as a whole.

Usability:

The system provides a help and support menu in all interfaces for the user to interact with the
system. The user can use the system by reading help and support.

Security:

The system provides username and password to prevent the system from unauthorized
access.The staffs’ password must be greater than eight characters. The subsystem should provide
a high level of security and integrity of the data held by the system, only authorized personnel of
the company can gain access to the company’s secured page on the system and only users with
valid password and username can login to view user’s page.

Performance:

The system response time for every instruction conducted by the user must not exceed more than
a minimum of 10 seconds. The system should have high performance rate when executing user’s
input and should be able to provide response within a short time span usually 50 second for
highly complicated task and 20 to 25 seconds for less complicated task.

Availability:

Dept. of CSE, AIT Bengaluru 4


Car Rental Management System 2020-2021

The system should always be available for access at 24 hours, 7 days a week. Also in the
occurrence of any major system malfunctioning, the system should be available in 1 to 2 working
days, so that business process is not severely affected.

CHAPTER: 3

SYSTEM DESIGN

E-R DIAGRAM

An Entity-relationship model describes inter-related things of interest in a specific domain of


knowledge. An ER model is composed of entity the things or and specifies relationships that can
be exist between instances of those entity types. ER Diagram should have mainly 3 components
namely entity, attributes, relationship.

Dept. of CSE, AIT Bengaluru 5


Car Rental Management System 2020-2021

Fig : 3.1 E-R DIAGRAM

SCHEMA DIAGRAM

Dept. of CSE, AIT Bengaluru 6


Car Rental Management System 2020-2021

Fig : 3.2 SCHEMA DIAGRAM

Dept. of CSE, AIT Bengaluru 7


Car Rental Management System 2020-2021

CHAPTER: 4

IMPLEMENTATION

4.1 Introduction:

The goal of coding or programming phase is to translate the design of the system. Produced
during the design phase into code in a given programming language, which can be executed by a
computer and that performance the computation performed by the Design.

4.2 Developing guidelines:

The coding is done with the following characteristics:

• Ease of design to code translation


• Code efficiency
• Memory efficiency
• Response time
• Maintainability
• Security
• Simple ease to understand code
• Efficient and consistent logic.

Dept. of CSE, AIT Bengaluru 8


Car Rental Management System 2020-2021

4.3 Programming style:

It is impossible to provide an exhaustive list of what to do and not to do produce simple readable
code. List some general rules that usually apply.

• Names: Selecting module and variable name is often not considered as important by invoice
programmers. Most variable in program reflect some process. Variable name should be closely
related to the entity they represent and module name should be reflected by their activity.

• Control construct: It is desirable to use a few standards control construct rather than using a
wide variety of constructs, just because of their available in the language.

• User defined types: Modern languages allow user to define types like enumerate type. When
such facilities are available, they should be exploited where applicable.

• Module size: A programmer should examine any routine with very few statements or too many
statements. Large modules often will not be functionally cohesive, and too small modules might
incur unnecessary overhead.

• Indentation: Indentation styles assist in identifying control flow and blocks of code. In some
programming languages, indentation is used to delimit logical blocks of code; correct indentation
in these cases is more than a matter of style. In other languages, indentation and white space do
not affect function, although logical and consistent indentation makes code more readable.

• Robustness: A program is robust if it does something plan for exceptional condition. A


program might encounter exceptional condition in such form as incorrect input the correct value
of some variable and over flow. A program should try to handle such situation. In general, a
program should check for validation where possible, and should check for possible overflow of
data structure.

Dept. of CSE, AIT Bengaluru 9


Car Rental Management System 2020-2021

4.4 CREATION OF TABLE

CREATE TABLE IF NOT EXISTS `admin` (


`admin_id` int(11) NOT NULL AUTO_INCREMENT,
`uname` varchar(255) NOT NULL,
`pass` varchar(255) NOT NULL,
PRIMARY KEY (`admin_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

CREATE TABLE IF NOT EXISTS `cars` (


`car_id` int(11) NOT NULL AUTO_INCREMENT,
`car_name` varchar(255) NOT NULL,
`car_type` varchar(255) NOT NULL,
`image` text NOT NULL,
`hire_cost` int(11) NOT NULL,
`capacity` int(11) NOT NULL,
`status` varchar(255) NOT NULL,
PRIMARY KEY (`car_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

Dept. of CSE, AIT Bengaluru 10


Car Rental Management System 2020-2021

CREATE TABLE IF NOT EXISTS `client` (


`client_id` int(11) NOT NULL AUTO_INCREMENT,
`fname` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`id_no` int(11) NOT NULL,
`phone` int(11) NOT NULL,
`location` varchar(255) NOT NULL,
`gender` varchar(255) NOT NULL,
`car_id` int(11) NOT NULL,
`status` varchar(255) NOT NULL,
`mpesa` varchar(255) NOT NULL,
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

CREATE TABLE IF NOT EXISTS `hire` (


`hire_id` int(11) NOT NULL AUTO_INCREMENT,
`client_id` int(11) NOT NULL,
`car_id` int(11) NOT NULL,
`status` varchar(255) NOT NULL,
PRIMARY KEY (`hire_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Dept. of CSE, AIT Bengaluru 11


Car Rental Management System 2020-2021

CREATE TABLE IF NOT EXISTS `message` (


`msg_id` int(11) NOT NULL AUTO_INCREMENT,
`client_id` int(11) NOT NULL,
`message` varchar(255) NOT NULL,
`status` varchar(255) NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`msg_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

4.5 INSERTION OF VALUES

INSERT INTO `admin` (`admin_id`, `uname`, `pass`) VALUES (1, 'admin', 'admin');

INSERT INTO `cars` (`car_id`, `car_name`, `car_type`, `image`, `hire_cost`, `capacity`, `status`)
VALUES
(1, 'Mercedes Benz', 'Mercedes Benz', 'car1.jpg', 20000, 5, 'Available'),
(2, 'Range Rover', 'LandRover', 'car2.jpg', 30000, 6, 'Available'),
(3, 'Harrier', 'Toyota', 'car3.jpg', 20000, 6, 'Available'),
(5, 'LandCruiser V8', 'LandCruiser ', 'images (2).jpg', 20000, 5, 'Available'),
(6, 'Security Vehicles', 'Hammar Cars', 'sonkort2.png', 30000, 8, 'Available'),
(7, 'Wedding Limousine', 'Wedding Limousine', 'images (3).jpg', 50000, 10, 'Available');

INSERT INTO `client` (`client_id`, `fname`, `email`, `id_no`, `phone`, `location`, `gender`,
`car_id`, `status`, `mpesa`) VALUES

Dept. of CSE, AIT Bengaluru 12


Car Rental Management System 2020-2021

(2, 'Kiran', 'Kiran@yahoo.com', 30073147, 705053484, 'nairobi', 'Male', 1, 'Approved',


'GTD45H7H6'),
(3, 'Sharan', 'sharan@gmail.com', 27695131, 707403614, 'kisii', 'Male', 2, 'Approved',
'DJFL870FDK9'),
(4, 'amogh', 'amogh@gmail.com', 1234567, 717056766, 'narok', 'Male', 2, 'Approved',
'HJHK678X');

INSERT INTO `message` (`msg_id`, `client_id`, `message`, `status`, `time`) VALUES


(2, 0, 'I am happy its working?', 'Unread', '2020-10-04 10:00:00'),
(3, 0, 'Thanks for that..OK?', 'Unread', '2020-11-08 08:00:00'),
(5, 0, 'I love this. It worked the way i want...', 'Unread', '2020-08-04 21:45:33');

Dept. of CSE, AIT Bengaluru 13


Car Rental Management System 2020-2021

4.6 QUERIES AND FRONTEND DETAILS

4.6.1 QUERIES

1. Retrieve all the details of the client with id 4.

Fig 4.6.1.1 Query 1 Output

2. Retrieve all the details of cars with car id less than 9 sort by car id.

Dept. of CSE, AIT Bengaluru 14


Car Rental Management System 2020-2021

Fig 4.6.1.2 Query 2 Output

3. Retrieve all the details of cars sort by car name.

Fig 4.6.1.3 Query 3 output

4. Retrieve the car id, name and type having car id=3.

Dept. of CSE, AIT Bengaluru 15


Car Rental Management System 2020-2021

Fig 4.6.1.4 Query 4 output

5. Retrieve all the details of the car Bugatti.

Fig 4.6.1.5 Query 5 output

Dept. of CSE, AIT Bengaluru 16


Car Rental Management System 2020-2021

4.6.2 FRONTEND DETAILS

 Connecting php to database

<?php
$host = "127.0.0.1:3307";
$user = "root";
$pass = "";
$db = "cars";
$conn = new mysqli($host, $user, $pass, $db);
if($conn->connect_error){
echo "Failed:" . $conn->connect_error;
}
?>

 XAMPP server
 Language Used
Front End(User Interface) HTML 5 , AJAX,JQUERY,JAVASCRIPT, BOOTSTRAP
Server Language PHP 5.5

4.6.3 Triggers

A database trigger is procedural code that is automatically executed in response to certain events
on a particular table or view in database. The trigger is most used for maintaining the integrity of
the information on the database. For example, when a new record is added to the patient table, if
he needs room, room table is automatically updated. Triggers can also be used to log historical
data, for example keeping track of patient and their medical history.

{CREATE | RECREATE | CREATE OR ALTER} TRIGGER name FOR {table name | view
name}

Dept. of CSE, AIT Bengaluru 17


Car Rental Management System 2020-2021

{ACTIVE | INACTIVE}

{BEFORE | AFTER}

{INSERT [OR UPDATE] [OR DELETE] | UPDATE [OR INSERT] [OR DELETE] |

DELETE [OR UPDATE] [OR INSERT] }

[POSITION n] AS BEGIN

…….

END

The below code explains the trigger concept which has been used in our project Create trigger if
any client is inserted , deleted or updated automatically their client_id is inserted into another
table called logs.

Working of triggers after insert into client

Create Trigger insertLogs


CREATE TRIGGER ‘insertLog’
AFTER INSERT ON ‘client’
FOR EACH ROW INSERT INTO logs
VALUES(null,NEW.client_id,‘Inserted’,NOW());

1. Create table logs.

Dept. of CSE, AIT Bengaluru 18


Car Rental Management System 2020-2021

Fig 4.6.3.1 Create table logs.

2. Creating insertLogs Trigger.

Dept. of CSE, AIT Bengaluru 19


Car Rental Management System 2020-2021

Fig 4.6.3.2 Creating insertLogs Trigger.

3. Inserting values into client table.

Fig 4.6.3.3 Inserting values into client table.

4. After inserting new values into client automatically client_id is stored in logs table.

Dept. of CSE, AIT Bengaluru 20


Car Rental Management System 2020-2021

Fig 4.6.3.4 Trigger Output

Chapter 5

Dept. of CSE, AIT Bengaluru 21


Car Rental Management System 2020-2021

Results and Discussion

5.1 Home Page

Fig 5.1 Home page

5.2 User Sign up Page

Fig 5.2 User Sign up Page

5.3 User Login Page

Dept. of CSE, AIT Bengaluru 22


Car Rental Management System 2020-2021

Fig 5.3 User Login Page

5.4 Car booking page

Fig 5.4 Car Booking page

5.5 Admin login page

Dept. of CSE, AIT Bengaluru 23


Car Rental Management System 2020-2021

Fig 5.5 Admin login page

5.6 Admin Dashboard page

Fig 5.6 Admin Dashboard page

5.7 Admin can add cars in vehicle management

Dept. of CSE, AIT Bengaluru 24


Car Rental Management System 2020-2021

Fig 5.7 Admin can add cars in vehicle management

5.8 Hire Requests page

Fig 5.8 Hire Requests page

5.9 Messages page

Dept. of CSE, AIT Bengaluru 25


Car Rental Management System 2020-2021

Fig 5.9 Messages page

5.10 Display of all tables

Fig 5.10 Display of all tables

CHAPTER 6

Dept. of CSE, AIT Bengaluru 26


Car Rental Management System 2020-2021

CONCLUSION

Thus we have studied about aps.net by performing project on online car booking in which we
have studied various controls available in aps.net such as label buttons list box etc. This project
is very useful for getting information about the car of different manufacture because now a day’s
no one have time to visit that places so visiting this website we get information about the
different cars and get the value for money. This project is designed in such way that normal
person means not a computer literature person can also handle it easily.

Dept. of CSE, AIT Bengaluru 27


Car Rental Management System 2020-2021

CHAPTER 7

REFERENCES

1. How to use php for front end : https://www.quora.com/How-do-you-use-PHP-in-the-front-end


2. Connecting php to the database : https://github.com/
3. Front end php codes : https://www.php.net/

4. Triggers : https://stackoverflow.com/

Dept. of CSE, AIT Bengaluru 28

You might also like