Question: Relational Schema 1 . User Attributes: UserID ( Primary Key ) , Name, Email, PhoneNumber, Password, Rating Cardinality: One user can request multiple rides; each
Relational Schema
User
Attributes: UserID Primary Key Name, Email, PhoneNumber, Password, Rating
Cardinality: One user can request multiple rides; each ride can be associated with one user.
Driver
Attributes: DriverID Primary Key Name, Email, PhoneNumber, LicenseNumber, VehicleID Foreign Key Rating
Cardinality: One driver can complete multiple rides; each ride is driven by one driver.
Vehicle
Attributes: VehicleID Primary Key Model, Make, LicensePlate, Color, DriverID Foreign Key
Cardinality: Each vehicle is driven by one driver, but a driver can have multiple vehicles over time.
Ride
Attributes: RideID Primary Key UserID Foreign Key DriverID Foreign Key StartLocation, EndLocation, StartTime, EndTime, Fare
Cardinality: Each ride involves one user and one driver.
Payment
Attributes: PaymentID Primary Key RideID Foreign Key Amount, PaymentMethod, PaymentDate
Cardinality: One payment per ride, but a ride may have a split payment involving different methods.
Trip Feedback
Attributes: FeedbackID Primary Key RideID Foreign Key UserFeedback,
DriverFeedback, Rating
Cardinality: Each ride can have one feedback entry from both the user and the driver.
Location
Attributes: LocationID Primary Key Address, City, State, ZipCode, Coordinates
Cardinality: Each ride has two related locations: StartLocation and EndLocation.
Fare Breakdown
Attributes: BreakdownID Primary Key RideID Foreign Key BaseFare, DistanceCharge,
TimeCharge, SurgeMultiplier
Cardinality: Each ride has one fare breakdown.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
