0% found this document useful (0 votes)
21 views3 pages

Database Design for Ride-Sharing System

The document outlines the design of a database system for a global ride-sharing platform, detailing the main entities such as Passenger, Driver, Vehicle, Ride, Payment, Promotion, Route, and Route Leg, along with their attributes and relationships. It emphasizes the importance of tracking rides, managing payments, and applying promotions to enhance the user experience. Additionally, it specifies constraints to ensure operational integrity and safety within the system.

Uploaded by

ebisagetahun172
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

Database Design for Ride-Sharing System

The document outlines the design of a database system for a global ride-sharing platform, detailing the main entities such as Passenger, Driver, Vehicle, Ride, Payment, Promotion, Route, and Route Leg, along with their attributes and relationships. It emphasizes the importance of tracking rides, managing payments, and applying promotions to enhance the user experience. Additionally, it specifies constraints to ensure operational integrity and safety within the system.

Uploaded by

ebisagetahun172
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

INTRODUCTION

This assignment focuses on designing a database system for a global ride-sharing platform, similar to
apps like Uber or Bolt. The system connects passengers with drivers, manages vehicles, tracks rides,
handles payments, applies promotions, and organizes routes. The goal is to make the ride experience safe,
efficient, and flexible. Each ride, driver, vehicle, payment, and promotion is tracked carefully, and the
system also handles premium rides with extra features. The database design includes the main entities,
their attributes, relationships, and rules to ensure everything works smoothly.

Entities in the Ride-Sharing System


 Passenger – This entity represents the users who book rides. Each passenger has a
unique ID to identify them, and the system keeps track of their name, phone number,
email, and rating based on driver feedback.
 Driver -This entity represents the people who provide rides. Each driver has a unique ID.
The system also keeps track of the driver’s license number, verification status.
 Vehicle -This entity represents cars used for rides. Each vehicle has a unique ID, and the
system records the model, and category (Economy, Premium, or XL). A driver can own
multiple vehicles.
 Ride - This entity represents a single trip booked by a passenger. Each ride has a unique
ID, pickup and drop-off locations, scheduled time, pricing, passenger rating, and ride
type (Standard or Premium). Premium rides can have extra features like Wi-Fi and
refreshment.
 Payment - This entity represents payments made for rides. Each payment has a unique
ID, the type of payment (Cash, Card, Wallet, or Coupon), and the amount paid. One ride
can have multiple payments if combined methods are used.
 Promotion - This entity represents discounts or offers that can be applied to rides. Each
promotion has a unique ID, discount amount, applicable area, valid time, and passenger
history.
 Route - This entity represents the path a ride follows from pickup to drop-off. Each route
has a unique ID, total distance, and estimated time.
 Route leg - This entity represents a single segment of a route. Each leg has a unique ID,
start and end locations, distance, and traffic condition. A route may consist of multiple
legs.

Attributes in each Entities


 Passenger
o PassengerID → Unique number to identify each passenger
o Name → Passenger’s full name
o Phone → Contact number
o Email → Email address
o Rating → Average rating from drivers after rides
 Driver
o DriverID → Unique number to identify each driver
o Name → Full name of the driver
o LicenseNumber → Driving license number of the driver
o DriverVerificationStatus → Shows if the driver has passed safety and
background checks (Verified / Not Verified)
 Vehicle
o VehicleID → Unique number to identify each vehicle
o Model → Vehicle make/model
o Category → Economy / Premium / XL
 Ride
o RideID → Unique number for each ride
o Pickup → Location where the passenger is picked up
o Drop-off → Location where the passenger is dropped off
o Time → Time and date when the ride happens
o Dynamic Pricing → Cost of the ride (can change with demand or traffic)
o RideType → Standard or Premium
o Wi-Fi → Yes/No (for premium rides)
o Refreshments → Yes/No (for premium rides)
 Payment
o PaymentID → Unique number for each payment
o PaymentType → Cash / Card / Wallet / Coupon
o Amount → Amount paid
 Promotion
o PromotionID → Unique number to identify promotion
o DiscountAmount → How much money or percentage is discounted
o Location→ Location(s) where promotion is valid
o ValidTime → Time or date range when promotion can be used
o Passenger History→ Which passengers can use the promotion (e.g., new users, frequent
users)
 Route
o RouteID → Unique number for each route
o TotalDistance → Total distance of the route
o EstimatedTime → Estimated duration to complete the route
 Route Leg
o LegID → Unique number for each segment of the route
o StartLocation → Starting point of the leg
o EndLocation → Ending point of the leg
o Distance → Distance of that segment
o TrafficCondition → Traffic info for the leg (e.g., Light, Moderate, Heavy)

Relationship
[Link] – book – Ride Cardinality : one - to - many

[Link] – drives – Ride Cardinality: one – to – many

[Link] – own –Vehicle Cardinality: one –to – many

[Link] –uses – Vehicle Cardinality: many –to- one

[Link] – has – Payment Cardinality: one –to –many

[Link] –applies – Promotion Cardinality: many –to –many

[Link] – follows- Route Cardinality: many –to – one

[Link] consists of RouteLeg Cardinality: one – to- many

Constraints
 A driver can only drive one ride at a time
 A vehicle can be driven by only one driver at a time
 Each ride must have at least one payment, which can combine multiple methods
 Route must consist of at least one leg
 Vehicle category must be Economy, Premium, or XL
 Ifa ride is marked as Premium it must have Wi-Fi and refreshments
 Drivers must maintain valid licenses and certifications
 Promotions can be applied based on location, time, or passenger history

Common questions

Powered by AI

The Promotion entity plays a crucial role in enhancing customer retention and satisfaction by offering discounts or special offers applicable to rides . Promotions can be targeted based on location, time, or passenger history, such as rewards for new or frequent users . This strategic use of promotions incentivizes ride bookings and enhances user engagement by providing value, potentially converting first-time users into regular customers and rewarding loyalty, thus improving overall customer satisfaction.

The system ensures flexibility in ride types by allowing rides to be categorized as either Standard or Premium . Premium rides offer additional features such as Wi-Fi and refreshments , providing enhanced service quality for passengers willing to pay a higher price. By clearly distinguishing the services and features of each ride type, the platform can cater to different customer preferences and ensure each ride meets specific service standards, thus maintaining overall service quality across different offerings.

Vehicle categories such as Economy, Premium, and XL are integral to the database design as they define the type of service a vehicle can offer . These categories allow for service segmentation by providing options that cater to different customer needs and price points, enhancing user choice and satisfaction. Economy vehicles offer basic service, while Premium vehicles provide added features like Wi-Fi, and XL vehicles cater to larger groups, thus allowing the platform to effectively segment and target different market segments based on customer preferences.

The integration of multiple payment methods, such as Cash, Card, Wallet, or Coupon, in the database design greatly enhances the user experience by providing flexibility and convenience in payment options . This allows users to choose the most convenient or cost-effective payment method depending on their circumstances, which can increase satisfaction and adoption of the platform. Additionally, the ability to use multiple payment methods for a single ride ensures that users are not constrained by payment options, thus meeting diverse user needs.

The system handles passenger ratings through a feedback mechanism that records driver feedback about passengers after rides . By associating ratings directly with the passenger's entity using a unique PassengerID, the system can ensure ratings are accurately attributed and maintained over time. Additionally, linking ratings with driver feedback allows the system to compute an average rating, providing a reliable metric for driver satisfaction and passenger behavior, which can inform service personalization and overall quality assessment.

The system ensures compliance with driving regulations by requiring drivers to provide valid driving licenses and undergo verification to pass safety and background checks . The database tracks driver verification status, ensuring that only qualified drivers are allowed to operate on the platform. Regular checks and updates of licensing and verification records maintain compliance, which not only guarantees regulatory adherence but also enhances the safety and reliability of the service provided to passengers.

In the ride-sharing database, the relationship between the Passenger and Ride entities is that a Passenger can book multiple Rides, representing a one-to-many relationship . This implies that the system's design must accommodate the ability to track multiple rides associated with a single passenger, including storing all relevant details for each ride, such as pickup and drop-off locations, times, and ride types. This requires efficient management of passenger data to ensure personalized service and data integrity in booking processes.

Requiring routes to consist of at least one leg implies that each route must have a defined path, including start and end locations, and traffic conditions, which are managed in segments . This constraint ensures that route data is accurately captured and segmented, facilitating detailed tracking and optimization of rides. It allows the system to dynamically manage and assess each segment's traffic conditions, potentially improving journey planning and estimated arrival times, and thus enhancing overall operational efficiency.

The constraints on the Driver and Vehicle entities include that a driver can only drive one ride at a time, and a vehicle can be driven by only one driver at a time . These constraints ensure operational efficiency by preventing scheduling conflicts and enhance safety by ensuring each driver focuses on a single ride at a time. Additionally, drivers must have valid licenses and certifications, ensuring that all drivers are qualified to operate a vehicle, which helps maintain high safety standards on the platform.

Dynamic pricing in the Ride entity is significant because it allows the cost of a ride to vary based on demand and traffic conditions . This means the system can adjust prices to reflect real-time market conditions, potentially leading to higher earnings for drivers during peak times or congestion periods. However, this may affect the user experience by making costs less predictable, which could be viewed negatively by passengers if not communicated transparently. Balancing demand management with customer satisfaction is therefore crucial.

You might also like