List all students WHO have reserve a Book with theme drama

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
List all students WHO have reserve a Book with theme drama 

MariaDB (tentaq4]> INSERT INTO Reservation VALUES(100,101,STR_TO DATE('17
Query OK, 1 row affected (0.008 sec)
MariaDB [tentaq4]> show tables;
Tables_in_tentaq4 |
book
reservation
student
3 rows in set (0.003 sec)
MariaDB (tentaq4]> select from book;
| bid | bname
| theme
Tet
101 | Lake Travels | Drama
102 Star War
|Fiction
Adventure
103 Flipper
104 Red Eye
Horror
4 rows in set (0.001 sec)
MariaDB [tentaq4]> select from reservation;
| sid | bid | rday
22 | 101
22 |
1996-11-10 I
TOT
102 1996-11-10
22 | 103 | 1998-08-10
22 | 104 | 1998-07-10
31 | 102 | 1998-11-11
31 | 103 | 1998-06-11
31 | 104 1998-11-12
58 103 1996-12-11
19
101
64 | 102 | 1998-08-05
60-80-8661
71 | 102 | 2000-07-15
71
74 103 1998-08-05
100 | 101 | 2000-07-15
| 100 | 101 | 2000-07-17
S0-80-666T EOT
-----+
15 rows in set (0.000 sec)
MariaDB (tentaq4]> select * from student;
Transcribed Image Text:MariaDB (tentaq4]> INSERT INTO Reservation VALUES(100,101,STR_TO DATE('17 Query OK, 1 row affected (0.008 sec) MariaDB [tentaq4]> show tables; Tables_in_tentaq4 | book reservation student 3 rows in set (0.003 sec) MariaDB (tentaq4]> select from book; | bid | bname | theme Tet 101 | Lake Travels | Drama 102 Star War |Fiction Adventure 103 Flipper 104 Red Eye Horror 4 rows in set (0.001 sec) MariaDB [tentaq4]> select from reservation; | sid | bid | rday 22 | 101 22 | 1996-11-10 I TOT 102 1996-11-10 22 | 103 | 1998-08-10 22 | 104 | 1998-07-10 31 | 102 | 1998-11-11 31 | 103 | 1998-06-11 31 | 104 1998-11-12 58 103 1996-12-11 19 101 64 | 102 | 1998-08-05 60-80-8661 71 | 102 | 2000-07-15 71 74 103 1998-08-05 100 | 101 | 2000-07-15 | 100 | 101 | 2000-07-17 S0-80-666T EOT -----+ 15 rows in set (0.000 sec) MariaDB (tentaq4]> select * from student;
XAMPP or
| 100 | 101 | 2000-07-17|
15 rows in set (0.000 sec)
MariaDB [tentaq4]> select • from student;
| sid | sname I discount age
45 1
SE
35 |
EE
22 | Dustin
| 28 | Yuppy
29 | Brustus
31 | Larken
| 32 | Andy
Guppy
58 Rusty
00°L
00°6
| 00°T
SS
25
00 8
| 00°8
00°S
SE
| SE
35
SE
64 Herti
71 | Zorba
74 | Herti
00°L
10.00
9-
| 00°6
00°E
SE
25
85
Art
| 00°E
| 00°E
| E9
| 6T
95 | Bob
13 rows in set (0.000 sec)
MariaDB (tentaq4]> describe student;
+-
| Field I Type
| Null | Key | Default | Extra |
smallint(6) | NO
| varchar(20) | YES |
float (6,2) | YES I
| tinyint(4) | YES
| PRI
NULL
PTS
sname
discount
NULL
ade
אחךך
4 rows in set (0.010 sec)
MariaDB [tentaq4]> describe book;
---
+.
| Field | Type
| Null | Key | Default | Extra |
bid I
smallint(6) | NO
PRI | NULL
bname I | YES
varchar (20)
theme varchar(15) | YES
NULL
3 rows in set (0.006 sec)
MariaDB [tentaq4]> describe reservation;
| Field | Type
| Null | Key | Default | Extra |
Transcribed Image Text:XAMPP or | 100 | 101 | 2000-07-17| 15 rows in set (0.000 sec) MariaDB [tentaq4]> select • from student; | sid | sname I discount age 45 1 SE 35 | EE 22 | Dustin | 28 | Yuppy 29 | Brustus 31 | Larken | 32 | Andy Guppy 58 Rusty 00°L 00°6 | 00°T SS 25 00 8 | 00°8 00°S SE | SE 35 SE 64 Herti 71 | Zorba 74 | Herti 00°L 10.00 9- | 00°6 00°E SE 25 85 Art | 00°E | 00°E | E9 | 6T 95 | Bob 13 rows in set (0.000 sec) MariaDB (tentaq4]> describe student; +- | Field I Type | Null | Key | Default | Extra | smallint(6) | NO | varchar(20) | YES | float (6,2) | YES I | tinyint(4) | YES | PRI NULL PTS sname discount NULL ade אחךך 4 rows in set (0.010 sec) MariaDB [tentaq4]> describe book; --- +. | Field | Type | Null | Key | Default | Extra | bid I smallint(6) | NO PRI | NULL bname I | YES varchar (20) theme varchar(15) | YES NULL 3 rows in set (0.006 sec) MariaDB [tentaq4]> describe reservation; | Field | Type | Null | Key | Default | Extra |
Expert Solution
Step 1

This question is related to the SQL and DBMS(DataBase Management System). So we and to show the list of students have booked "Drama" related books. And the data is spread in 3 different tables.So the solution query should contains the  merging of all these 3 tables. Please find the query below.

'

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Web Page
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