Consider the following schema: Sailors(sid, sname, rating, age) Reserve(sid, bid, day) Boats(bid, bname, size) Reserve.sid is a foreign key to Sailors and Reserves.bid is a foreign key to Boats.bid. We are given the following information about the database: Reserves contains 10,000 records with 40 records per page. Sailors contains 1000 records with 20 records per page. Boats contains 100 records with 10 records per page. There are 50 values for Reserves.bid. There are 10 values for Sailors.rating in the range of [1, 10]. There are 10 values for Boat.size in the range of [1,10] There are 500 values for Reserves.day from Jan 1, 2003 to May 14, 2004 (all the 500 days in this range). SELECT S.sid, S.sname, B.bname FROM Sailors S, Reserves R, Boats B WHERE S.sid=R.sid AND R.bid = B.bid AND B.size>5 AND R.day=DATE ‘July 4, 2003’ Consider the following SQL query for the remaining questions: SELECT S.sid, S.sname, B.bname

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

Consider the following schema: Sailors(sid, sname, rating, age)

Reserve(sid, bid, day)

Boats(bid, bname, size)

Reserve.sid is a foreign key to Sailors and Reserves.bid is a foreign key to Boats.bid. We are given the following information about the database:

Reserves contains 10,000 records with 40 records per page.

Sailors contains 1000 records with 20 records per page.

Boats contains 100 records with 10 records per page.

There are 50 values for Reserves.bid.

There are 10 values for Sailors.rating in the range of [1, 10].

There are 10 values for Boat.size in the range of [1,10]

There are 500 values for Reserves.day from Jan 1, 2003 to May 14, 2004 (all the 500 days in this range).

SELECT S.sid, S.sname, B.bname

FROM Sailors S, Reserves R, Boats B

WHERE S.sid=R.sid AND R.bid = B.bid AND B.size>5 AND R.day=DATE ‘July 4, 2003’

Consider the following SQL query for the remaining questions:

SELECT S.sid, S.sname, B.bname

FROM Sailors S, Reserves R, Boats B WHERE S.sid=R.sid AND R.bid = B.bid

 Write down all possible left-deep (logical) plans for the query (i.e., no need to specify the join algorithms of each join operator),

Please give detailed solution.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
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