Q9. Write an SQL statement to answer the question: 'Are there any bookings not driven by qualified drivers, i.e. driver tvpe not matching vehicle type?' The resulting table is as follows. BOOK_ID VEH_DESC VYEH_TYPE DRIVER_NAME DRIVER_TYPE BOOK_DATE BOOK_TIME BOOK_HRS 1 8728 |Volvo FM12 |Medium Truck Vincent Ma LGV |2022/3/4 14:30 2 Q10. In view of the possible problem as per Q9, suggest a way to prevent such booking. You may consider running query to highlight this or changing the data model to prevent so. Explain your suggestion.
Q9. Write an SQL statement to answer the question: 'Are there any bookings not driven by qualified drivers, i.e. driver tvpe not matching vehicle type?' The resulting table is as follows. BOOK_ID VEH_DESC VYEH_TYPE DRIVER_NAME DRIVER_TYPE BOOK_DATE BOOK_TIME BOOK_HRS 1 8728 |Volvo FM12 |Medium Truck Vincent Ma LGV |2022/3/4 14:30 2 Q10. In view of the possible problem as per Q9, suggest a way to prevent such booking. You may consider running query to highlight this or changing the data model to prevent so. Explain your suggestion.
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...
Related questions
Question
100%

Transcribed Image Text:Q9. Write an SQL statement to answer the question: 'Are there any bookings not
driven by qualified drivers, i.e. driver tvpe not matching vehicle type?’ The
resulting table is as follows.
BOOK ID VEH_DESC YEH_TYPE
1 8728 Volvo FM12 Medium Truck Vincent Ma LGV
DRIVER_MAME DRIVER_TYPE BOOK_DATE BOOK_TIME BOOK_HRS
|2022/3/4 14:30
2
Q10. In view of the possible problem as per Q9, suggest a way to prevent such
booking. You may consider running query to highlight this or changing the data
model to prevent so. Explain your suggestion.

Transcribed Image Text:DRIVER
Primary Key: DRIVER_ID
DRIVER_ID DRIVER_NAME
DRIVER_TYPE
1 CL818
2 SW572
3 PT232
| Charles Leung
Sara Wong
Peter Tang
Emily Cheung
Vincent Ma
LGV
Medium Truck
Medium Truck
4 EC625
5 VM888
6 DW365
Heavy Truck
LGV
David Wu
LGV
VEHICLE
Primary Key: VEH_ID
VEH_DESC
|Toyota Hiace
Toyota Hiace
Volvo FM12
VEH_ID
VEH_TYPE
1 LGV859
2 LGV325
3 FM1208
4 FH1601
LGV
LGV
Medium Truck
Volvo FH16
Heavy Truck
.....
BOOKING
Primary Key: BOOK_ID
Foreign Keys: BOOK_VEH, BOOK_DRIVER
вооK ID BOOK_VEH BOOK_DRIVER
1 B723
2 B724
3 B725
4 B726
5 B727
6 B728
7 B729
BOOK_DATE BOOK_TIME BOOK_HRS
LGV325
VM888
ЕС625
2022/3/4
2022/3/4
2022/3/4
2022/3/4
2022/3/4
2022/3/4
2022/3/4
10:15
2.5
FH1601
10:30
LGV859
DW365
11:00
FM1208
PT232
11:00
LGV325
CL818
14:00
1.5
FM1208
VM888
14:30
LGV859
DW365
14:45
1.5
S23 5
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY