The following SQL queries use the instances of R1 of "Reserves" the instances of B1 of "Boats", and the instances of S1 of "Sailors" relation. An instance R1 of Reserves bid 101 day 10/10/96 11/12/96 103 10/11/96 12/01/96 12/05/96 10/10/09 10/10/98 10/07/98 RO 22 58 22 31 31 22 22 31 64 64 74 103 104 103 102 104 102 101 102 103 11/10/98 09/08/98 09/05/98 09/08/98 An instance B1 of Boats bid 101 102 103 bname Interlake Interlake Clipper Marine 104 bcolor blue red green red An instance S2 of Sailors Sid 28 31 21 44 58 256 22 22 29 29 32 m 64 21 74 85 95 71 sname yuppy Tubber guppy rusty Dustin Brutus Andy Horatio Horatio Zorba Art Bob Amy rating 81 5 10 711 L & |10|| 21 3 115 age 35 155 135 135 45 $3 25 35 18 25 635 46 1.If we wish to list out only the names and ratings of the sailors, we can write this in SQL statement as 2.Find out only the names and ages of sailors. 3.To find out the names and ratings of sailors with a rating above 8, we can combine two of the preceding queries as: 4.Find the names of sailors who are older than 40.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
### SQL Query Instances: An Educational Exercise

The following SQL queries utilize tables that represent instances of `Reserves`, `Boats`, and `Sailors`. 

#### Table 1: R1 of Reserves
An instance of the `Reserves` relation:
| sid | bid | day       |
|-----|-----|-----------|
| 22  | 101 | 10/10/96  |
| 58  | 103 | 11/12/96  |
| 22  | 102 | 10/10/96  |
| 31  | 101 | 10/10/98  |
| 31  | 102 | 10/22/98  |
| 22  | 104 | 10/10/99  |
| 22  | 102 | 10/11/98  |
| 22  | 101 | 10/7/99   |
| 64  | 104 | 10/9/98   |
| 58  | 102 | 09/05/98  |
| 64  | 102 | 09/08/98  |
| 58  | 102 | 09/08/98  |
| 22  | 102 | 10/11/98  |
| 31  | 102 | 11/09/98  |
| 64  | 102 | 09/05/98  |
| 64  | 103 | 09/08/98  |

#### Table 2: B1 of Boats
An instance of the `Boats` relation:
| bid | bname    | bcolor |
|-----|----------|--------|
| 101 | Interlake| blue   |
| 102 | Interlake| red    |
| 103 | Clipper  | green  |
| 104 | Marine   | red    |

#### Table 3: S1 of Sailors
An instance of the `Sailors` relation:
| sid | sname | rating | age |
|-----|-------|--------|-----|
| 22  | yuppy | 3      | 35  |
| 31  | lubber| 8      | 55  |
| 64  | guppy | 5      | 35  |
| 58  | rust
Transcribed Image Text:### SQL Query Instances: An Educational Exercise The following SQL queries utilize tables that represent instances of `Reserves`, `Boats`, and `Sailors`. #### Table 1: R1 of Reserves An instance of the `Reserves` relation: | sid | bid | day | |-----|-----|-----------| | 22 | 101 | 10/10/96 | | 58 | 103 | 11/12/96 | | 22 | 102 | 10/10/96 | | 31 | 101 | 10/10/98 | | 31 | 102 | 10/22/98 | | 22 | 104 | 10/10/99 | | 22 | 102 | 10/11/98 | | 22 | 101 | 10/7/99 | | 64 | 104 | 10/9/98 | | 58 | 102 | 09/05/98 | | 64 | 102 | 09/08/98 | | 58 | 102 | 09/08/98 | | 22 | 102 | 10/11/98 | | 31 | 102 | 11/09/98 | | 64 | 102 | 09/05/98 | | 64 | 103 | 09/08/98 | #### Table 2: B1 of Boats An instance of the `Boats` relation: | bid | bname | bcolor | |-----|----------|--------| | 101 | Interlake| blue | | 102 | Interlake| red | | 103 | Clipper | green | | 104 | Marine | red | #### Table 3: S1 of Sailors An instance of the `Sailors` relation: | sid | sname | rating | age | |-----|-------|--------|-----| | 22 | yuppy | 3 | 35 | | 31 | lubber| 8 | 55 | | 64 | guppy | 5 | 35 | | 58 | rust
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Table
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education