Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and end time with location are stored. In addition, the involved driver, car and user are listed for each drive. Price and discount information are also available in the database: TRAVEL ID TRAVEL, START_LOCATION TRAVEL, END_LOCATION DRIVER ID TRAVEL DISCOUNT TRAVEL_START_TIME TRAVEL END TIME TRAVEL PRICE CAR ID USER ID 5001 2019-10-01 04:04:55 2019-10-01 04:14:19 9614 York Road 84 Church Lane 15.44 2001 1003 3005 NULL 5002 2019-10-01 05:57:33 2019-10-01 06:12:33 47 Church Street 68 High Street 20.56 2001 1003 3006 NULL 5003 2019-10-01 13:35:20 2019-10-01 13:45:10 2 Windsor Road 95 West Street 12.32 2002 1001 3002 NULL 5004 2019-10-02 08:44:48 2019-10-02 09:15:28 9060 Mill Lane 27 Main Road 30.49 2003 1002 3001 0.13 5005 2019-10-02 16:38:54 2019-10-02 16:48:10 2 Queensway 24 Mill Lane 11.15 2001 1003 3007 NULL 5006 2019.10-03 19:12:14 2019-10-03 1923:45 50 Main Road 93 Broadway 14.61 2003 1002 3007 0.10 5007 2019-10-03 16:06:36 2019-10-03 16:08:56 39 Park Road 91 West Street 4.41 2002 1004 3003 0.14 5008 2019-10-03 17:17:12 2019-10-03 17:37:42 37 The Drive 17 Stanley Road 25.12 2001 1003 3001 0.25 5009 2019-10-03 21:16:48 2019-10-03 21:26:18 77 Mill Road 724 Springfield Road 13.55 2001 1003 3005 NULL 5010 2019-10-03 23:21:40 2019-10-03 23:39:10 16 Church Road 30 North Road 25.62 2003 1002 3003 0.20 TRAVELS Table You are assigned as the database administrator to collect and manage transactional data of the InstantRide operations. Your main task is to create SQL scripts to help other teams to retrieve the requested data. In the following activities, you will create the scripts, run against the database and send the result to the corresponding teams.

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter2: Data Models
Section: Chapter Questions
Problem 10P
icon
Related questions
Question

The Driver Relationship team realized that there is no need for DRIVER_DRIVING_LICENSE_CHECKED field in the active drivers table. Since all the drivers are already active in InstantRide, their driving licenses should be checked regularly. The team wanted you to remove the field from the table.

Instructions Page 1 of 4
Scenario and Database Model: InstantRide
InstantRide is the new ride sharing application in the city and it has just started its operations.
With the help of the InstantRide mobile application, the users request a ride with their location.
Drivers and cars are assigned to the request; and then the driver picks up the user to ride their
requested location. Information for the users, drivers and cars are stored in the database as
well as the travel transactions.
In the USERS table, information for the users are stored with their first name, last name and
email:
USER ID
USER FIRST_NAME
USER_ LAST_NAME
USER_EMAIL
3001
Jack
Hill
j.hill@xmail.com
3002
Ryan
Collins
r.collins@xmail.com
3003
Nursin
Yilmaz
n.atak@gmail.com
3004
Sarah
Price
s.price@xmail.com
3005
Bobby
Griffin
b.griffin@xmail.com
3006
Randy
Clark
r.clark@xmail.com
3007
Jose
Thomas
j.thomas@xmail.com
3008
Nursin
Yilmaz
n.yilmaz@xmail.com
USERS Table
In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving
license number and check and rating information:
DRIVER ID
DRIVER_FIRST_NAME DRIVER_LAST_NAME DRIVER DRIVING_LICENSE_ID
DRIVER START DATE DRIVER_DRIVING_LICENSE CHECKED
DRIVER_RATING
2001
Willie
Butler
1874501
2019-09-12
4.4
2002
Justin
Howard
1953853
2019-09-09
4.8
2003
Anthony
Walker
1735487
2019-09-15
1
3.5
2004
Ece
Yilmaz
1734747
2019-08-15
1
DRIVERS Table
In the CARS table, all the cars in the InstantRide system are kept with the license plate, model
and year:
CAR ID
CAR PLATE
CAR_MODEL
CAR YEAR
1001
BB-542-AB
TOYOTA PRIUS
2018
1002
BB-883-EE
TESLA MODEL 3
2019
1003
BB-451-ZN
TOYOTA AURIS
2019
1004
B-189-ММ
MERCEDES E200
2019
CARS Table
Transcribed Image Text:Instructions Page 1 of 4 Scenario and Database Model: InstantRide InstantRide is the new ride sharing application in the city and it has just started its operations. With the help of the InstantRide mobile application, the users request a ride with their location. Drivers and cars are assigned to the request; and then the driver picks up the user to ride their requested location. Information for the users, drivers and cars are stored in the database as well as the travel transactions. In the USERS table, information for the users are stored with their first name, last name and email: USER ID USER FIRST_NAME USER_ LAST_NAME USER_EMAIL 3001 Jack Hill j.hill@xmail.com 3002 Ryan Collins r.collins@xmail.com 3003 Nursin Yilmaz n.atak@gmail.com 3004 Sarah Price s.price@xmail.com 3005 Bobby Griffin b.griffin@xmail.com 3006 Randy Clark r.clark@xmail.com 3007 Jose Thomas j.thomas@xmail.com 3008 Nursin Yilmaz n.yilmaz@xmail.com USERS Table In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information: DRIVER ID DRIVER_FIRST_NAME DRIVER_LAST_NAME DRIVER DRIVING_LICENSE_ID DRIVER START DATE DRIVER_DRIVING_LICENSE CHECKED DRIVER_RATING 2001 Willie Butler 1874501 2019-09-12 4.4 2002 Justin Howard 1953853 2019-09-09 4.8 2003 Anthony Walker 1735487 2019-09-15 1 3.5 2004 Ece Yilmaz 1734747 2019-08-15 1 DRIVERS Table In the CARS table, all the cars in the InstantRide system are kept with the license plate, model and year: CAR ID CAR PLATE CAR_MODEL CAR YEAR 1001 BB-542-AB TOYOTA PRIUS 2018 1002 BB-883-EE TESLA MODEL 3 2019 1003 BB-451-ZN TOYOTA AURIS 2019 1004 B-189-ММ MERCEDES E200 2019 CARS Table
Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and
end time with location are stored. In addition, the involved driver, car and user are listed for
each drive. Price and discount information are also available in the database:
TRAVEL ID
TRAVEL, END_TIME
TRAVEL, START LOCATION
TRAVEL DISCOUNT
TRAVEL_START_TIME
TRAVEL END LOCATION
TRAVEL PRICE
DRIVER ID
CAR ID
USER ID
5001
2019-10-01 04:04:55
9614 York Road
84 Church Lane
2019-10-01 04:14:19
15.44
2001
1003
3005
NULL
5002
2019-10-01 05:57:33
2019-10-01 06:12:33
47 Church Street
68 High Street
20.56
2001
1003
3006
NULL
5003
2019-10-01 13:35:20
2019-10-01 13:45:10
2 Windsor Road
95 West Street
12.32
2002
1001
3002
NULL
5004
2019-10-02 08:44:48
2019-10-02 09:15:28
9060 Mill Lane
27 Main Road
30.49
2003
1002
3001
0.13
5005
2019-10-02 16:38:54
2019-10-02 16:48:10
2 Queensway
24 Mill Lane
11.15
2001
1003
3007
NULL
5006
2019-10-03 19:12:14
2019-10-03 19:23:45
50 Main Road
93 Broadway
14.61
2003
1002
3007
0.10
5007
2019-10-03 16:06:36
2019-10-03 16:08:56
39 Park Road
91 West Street
4.41
2002
1004
3003
0.14
5008
2019-10-03 17:17:12
37 The Drive
17 Stanley Road
25.12
2001
0.25
2019-10-03 17:37:42
1003
3001
5009
2019-10-03 21:16:48
2019-10-03 21:26:18
77 Mill Road
724 Springfield Road
13.55
2001
1003
3005
NULL
5010
2019-10-03 23:21:40
2019-10-03 23:39:10
16 Church Road
30 North Road
25.62
2003
1002
3003
0.20
TRAVELS Table
You are assigned as the database administrator to collect and manage transactional data of the
InstantRide operations. Your main task is to create SQL scripts to help other teams to retrieve
the requested data. In the following activities, you will create the scripts, run against the
database and send the result to the corresponding teams.
Transcribed Image Text:Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and end time with location are stored. In addition, the involved driver, car and user are listed for each drive. Price and discount information are also available in the database: TRAVEL ID TRAVEL, END_TIME TRAVEL, START LOCATION TRAVEL DISCOUNT TRAVEL_START_TIME TRAVEL END LOCATION TRAVEL PRICE DRIVER ID CAR ID USER ID 5001 2019-10-01 04:04:55 9614 York Road 84 Church Lane 2019-10-01 04:14:19 15.44 2001 1003 3005 NULL 5002 2019-10-01 05:57:33 2019-10-01 06:12:33 47 Church Street 68 High Street 20.56 2001 1003 3006 NULL 5003 2019-10-01 13:35:20 2019-10-01 13:45:10 2 Windsor Road 95 West Street 12.32 2002 1001 3002 NULL 5004 2019-10-02 08:44:48 2019-10-02 09:15:28 9060 Mill Lane 27 Main Road 30.49 2003 1002 3001 0.13 5005 2019-10-02 16:38:54 2019-10-02 16:48:10 2 Queensway 24 Mill Lane 11.15 2001 1003 3007 NULL 5006 2019-10-03 19:12:14 2019-10-03 19:23:45 50 Main Road 93 Broadway 14.61 2003 1002 3007 0.10 5007 2019-10-03 16:06:36 2019-10-03 16:08:56 39 Park Road 91 West Street 4.41 2002 1004 3003 0.14 5008 2019-10-03 17:17:12 37 The Drive 17 Stanley Road 25.12 2001 0.25 2019-10-03 17:37:42 1003 3001 5009 2019-10-03 21:16:48 2019-10-03 21:26:18 77 Mill Road 724 Springfield Road 13.55 2001 1003 3005 NULL 5010 2019-10-03 23:21:40 2019-10-03 23:39:10 16 Church Road 30 North Road 25.62 2003 1002 3003 0.20 TRAVELS Table You are assigned as the database administrator to collect and manage transactional data of the InstantRide operations. Your main task is to create SQL scripts to help other teams to retrieve the requested data. In the following activities, you will create the scripts, run against the database and send the result to the corresponding teams.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Intermediate SQL concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning