Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP ME WITH THIS THE SQL IS BEEN HARD FOR ME I JUST NEED A BETTER UNDERSTANDING OF THIS SO IF I HAVE SOMETHING

PLEASE HELP ME WITH THIS THE SQL IS BEEN HARD FOR ME I JUST NEED A BETTER UNDERSTANDING OF THIS SO IF I HAVE SOMETHING TO REFER TO THAT WOULD BE HELPFUL WHEN YOU COMPLETE THIS COULD YOU MAYBE LEAVE NOTES? THANK YOU SO MUCH TO WHOEVER HELPS ME!

SQL Queries

Consider the Drivers-Cars-Reserves DB for a small rental car company:

Drivers(id, name, rating, age)

Cars(vin, maker, model, year, color)

Reserves(did, vin, date)

Give SQL and Relational Algebra expression for each of the following operations:

Find the colors of cars reserved by Smith.

Find all ids of drivers who have a rating of at least 7 or reserved car with VIN:1HGCM82633A004352

Find the names of drivers who have not reserved a red car.

Find the driver ids of drivers with age over 21 who have not reserved a red car.

Find the names of drivers who have reserved at least two cars.

Find the driver ids of all drivers whose rating is better than some driver called Bob.

Find the driver ids of all drivers whose rating is better than every driver called Bob.

Find the driver ids of all drivers with the highest rating.

Find the names of drivers who have reserved all cars.

Find the names of drivers who have reserved all red cars.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Tell the merits and demerits of Mendeleev's periodic table.

Answered: 1 week ago

Question

=+ Have they changed the way employers view IP?

Answered: 1 week ago