Task 3: The Driver Relationship team wants to create some workshops and increase communication with the active drivers in InstantRide. Therefore, they requested a new database table to store the driver details of the drivers that have had at least one ride in the system. Create a new table, ACTIVE_DRIVERS, from the DRIVERS and TRAVELS tables which contains the following fields: DRIVER_ID CHAR(5) (Primary key) DRIVER_FIRST_NAME VARCHAR(20) DRIVER_LAST_NAME VARCHAR(20) DRIVER_DRIVING_LICENSE_ID VARCHAR(10) DRIVER_DRIVING_LICENSE_CHECKED BOOL DRIVER_RATING FLOAT SQL Database Test: Create a new table to store information on active drivers Test Query: SELECT * FROM ACTIVE_DRIVERS   Expected Results: DRIVER_ID DRIVER_FIRST_NAME DRIVER_LAST_NAME DRIVER_DRIVING_LICENSE_ID DRIVER_DRIVING_LICENSE_CHECKED DRIVER_RATING 2001 Willie Butler 1874501 1 4.4 2002 Justin Howard 1953853 1 4.8 2003 Anthony Walker 1735487 1

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Task 3:

The Driver Relationship team wants to create some workshops and increase communication with the active drivers in InstantRide. Therefore, they requested a new database table to store the driver details of the drivers that have had at least one ride in the system. Create a new table, ACTIVE_DRIVERS, from the DRIVERS and TRAVELS tables which contains the following fields:

  • DRIVER_ID CHAR(5) (Primary key)
  • DRIVER_FIRST_NAME VARCHAR(20)
  • DRIVER_LAST_NAME VARCHAR(20)
  • DRIVER_DRIVING_LICENSE_ID VARCHAR(10)
  • DRIVER_DRIVING_LICENSE_CHECKED BOOL
  • DRIVER_RATING FLOAT

SQL Database Test:

Create a new table to store information on active drivers

Test Query: SELECT * FROM ACTIVE_DRIVERS
 
Expected Results:
DRIVER_ID DRIVER_FIRST_NAME DRIVER_LAST_NAME DRIVER_DRIVING_LICENSE_ID DRIVER_DRIVING_LICENSE_CHECKED DRIVER_RATING
2001 Willie Butler 1874501 1 4.4
2002 Justin Howard 1953853 1 4.8
2003 Anthony Walker 1735487 1 3.5

 

Task 4:

The Driver Relationship team wants to have quick search options for the active drivers. The team specifically mentioned that they are using first name, last name and driving license ID to search the drivers. Create an index called NameSearch on the ACTIVE_DRIVERS table created in task 3.

SQL Database Test:

Create an INDEX to search the ACTIVE_DRIVERS table.

Test Query:

SHOW INDEX FROM ACTIVE_DRIVERS

Expected Results:

Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Visible Expression
ACTIVE_DRIVERS 0 PRIMARY 1 DRIVER_ID A 3 NULL NULL   BTREE     YES NULL
ACTIVE_DRIVERS 1 NameSearch 1 DRIVER_FIRST_NAME A 3 NULL NULL YES BTREE     YES NULL
ACTIVE_DRIVERS 1 NameSearch 2 DRIVER_LAST_NAME A 3 NULL NULL YES BTREE     YES NULL
ACTIVE_DRIVERS 1 NameSearch 3 DRIVER_DRIVING_LICENSE_ID A 3 NULL NULL YES BTREE     YES NULL

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Database Architectures
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY