Question: Relational Schema 1 . User Attributes: UserID ( Primary Key ) , Name, Email, PhoneNumber, Password, Rating Cardinality: One user can request multiple rides; each

Relational Schema
1.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.
2.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.
3.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.
4.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.
5.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.
6.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.
7.Location
Attributes: LocationID (Primary Key), Address, City, State, ZipCode, Coordinates
Cardinality: Each ride has two related locations: StartLocation and EndLocation.
8.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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!