Car Sharing System Source Code


Car Sharing System Source Code


This project “Car Sharing System” aims to encourage people to share cars, and at the same time, share the price of the ride.

Example Usage Scenario:

For example, a person with a car tells the system when and where he is going to a specific destination from a specific origin. If another person without a car wants to go to the same place from the same origin, then he could send a pick-up request to the driver. If the driver accepts the request, then the rider could be at the pickup location at the scheduled pickup time to share the car.

Database System:

For this project, we will be requiring a rather complex database system. In the next section, this system will be explained in detail. Information about what the database holds, the tables, and the entities with their attributes will be detailed.


This application will require a smartphone with GPS and an internet connection. The application will require users to go to our website, sign up, and provide some basic information. It also requires connections with banking APIs to process credit card information. Banks have APIs which we can use to manage microtransactions.


With an increased number of users, this database design might need further optimizations. Also, our design does not guarantee that the drive will be safe. If the driver crashes the car by mistake, we do not take any responsibility. This might be one of our biggest limitations. People generally do not trust other people when it comes to sharing cars.

Database Design of Car Sharing System Source Code

In this section of the report, the preliminary design for the database will be explained. The following tables are the results of an initial design process and they are subject to change with the further development of the project. The main goal here is to give an abstract view of how the database is approximately going to look like.

Account Entity

email: char (50) Keeps the e-mail addresses of all the account owners. Also, it is the primary key of the account entity

password: char (255) It keeps the passwords of the account owners for the login process

fname: char (50) First name of the user lname: char (50) Last name of the user

phone_num: char (14) The phone number of the user to provide the connection between driver, company, and passenger

age: integer (3) The age of the user

rating: integer (1) The average rating of the drivers and passengers. The rating is calculated by summing up all the ratings and dividing by the number of ratings

number_of_ratings: integer (10) Shows how many users rated the user or the driver

member_since: char (10) The account creation date

Passenger Entity

card: integer (16) It is the primary key of the passenger entity. It keeps a link to the specific
entry from the card entity shown below.

Card Entity

card_number: integer (16) It provides the relation between Card entity and

Passenger entity. It keeps the card number

cvc2: integer (3) The 3-digit CVC2 number on the back of the card

expr_date: char (10) The expiration date of the card

Driver Entity

The driver entity is the child entity of the Account entity. It keeps the attributes of the users who
own cars

license_plate: char (8) It is the primary key of the Driver entity. Holds the driver’s car’s license plate

licence_duration: integer (2) Keeps the date when the driver received his license. Could be used to see how experienced the driver is.

bank_account: char (255) The IBAN no of the driver to be paid by the passengers. The company provides this system. Credit cards of the users are going to be charged for this.

price_per_km: integer (10) The price per km. It is specified by the driver

Car Entity

license_plate: char(8) It is the primary key of the Car entity. It keeps the license plate of the car

brand: char (50) Brand of the car

model: char (50) Model of the car

model_year: integer (4) The model year of the car

engine_power: integer (3) Engine horsepower of the car

top_speed: integer (3) Maximum speed the car can reach

safety_score: integer (1) The safety records of the car and the other cars with the same models

comfort_rating: integer (1) The comfort rating specified by the car manufacturer

Request Entity

request_id: integer(10) This is the primary key of the entity. It keeps the id of the request

pickup_location: char(10) It keeps the pickup location on the journey. This is where the driver will pick up the passenger.

current_location: char(50) It keeps the current location of the passenger

destination: char(50) It keeps the journey destination

request_time: integer(10) The time which the user sent the request to the driver

passenger_email: char(50) E-mail address of the passenger

passengercard_number: integer(16) The card number of the passenger

Ride Entity

ride_id: integer(10) It keeps the id of the ride. Also, it is the primary key of the “Ride” entity

pickup_location: char (50) It keeps the pickup location of the Passengers

destination: char (50) It keeps the destination of the ride

driver_email: char (50) It keeps the email address of the driver

Driverlicense_plate: char (8) The license plate of the car owner

Request_id: integer (10) IDs of the requests

Scheduled Ride Entity

number_of_empty_seats: integer (2) The number of empty seats in the car

scheduled_departure_time: integer (10) The scheduled time for the driver to drive off from the pick-up location

Current Ride Entity

elapsed_time: integer (10) Elapsed time of the ride

elapsed_distance: integer (10) Elapsed distance of the ride

number_of_empty_seats: integer (2) The number of empty seats in the car

passenger_emails: char (255) The e-mail address of the passengers

Completed Ride Entity

total_time: integer (10) The total time elapsed to arrive at the destination

total_distance: integer (10) The total distance gone to arrive at the destination

price: integer (10) The total cost of the ride

passenger_emails: char (50) The e-mail addresses of the passengers


At the data layer, we will use MySQL Server in our DBMS. For application logic, we will use NodeJS. For the user interface, we’ll be using HTML 5 and CSS 3 together with JavaScript, jQuery, and Bootstrap.

Follow the below links for Project Source Code, Report, and Video demonstration

For project demonstration subscribe to our YouTube Channel – Subscribe. For Source code and report (Paid Service), you can send your details to

2 thoughts on “Car Sharing System Source Code”

Leave a Comment

Your email address will not be published. Required fields are marked *

Welcome to

Computer Graphics and Image Processing Mini Projects -> Click Here

Download Final Year Project -> Click Here

This will close in 12 seconds