Question: find the SQL code with this information: For each customer: a unique CustomerID as well as his or her name, phone number, and address a

find the SQL code with this information:
For each customer: a unique CustomerID as well as his or her name, phone number, and address
a) Reserves: Car
b) Rides With: Driver
2) For each Car: a Unique Car ID, Fuel, Registration number, Car (Type), Mini, Prime, Sedan
a) Has a Relationship with: Trip
3) For each Trip: a Destination, Estimate Time, and Source
a) Confirms: Booking
4) For each Booking:
a) HAS: Order details
b) INCLUDES: Payment
c) Works on: Driver
5) For each Order Details: A Ride (Type), UberX, Uber Green, and Uber Rent
6) For each Payment: a unique Payment ID, Payment Mode (Type), Cash, Card (Type), unique Card Number, and Expiration date
7) For each Driver: a unique Driver ID, name, License number, and contact number
a) Earns: Salary
8) For each Salary: an Amount, and dates: From Date, To Date
A. Each Customer can (reserve) many Cars. Each Car can have many Customers.
B. Each Car can have a (relationship) with Many trips. But each Trip can only have One Car.
C. Each trip (confirms) one booking. Each Booking confirms one Trip each.
D. Each Booking (Has) one order detail(s), and each Order detail(s) has one booking.
E. Each Booking (Includes) can include one payment type, and each payment includes one booking each.
F. Each Driver can (work on) Multiple Bookings, and Each booking can work with multiple drivers.
G. Each Driver (Earns) one salary, and Each salary has one Driver

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!