Use the given database to output the results of the following SQL queries: For these queries you need the student, takes, section, and teaches tables. I gave you all the resources you need. a.)  SELECT ∗ FROM Student AS S, Takes AS T WHERE S.ID = T.ID AND T.semester = 'Fall'; b.)  (SELECT S.course id, S.semester, S.year FROM Section AS S WHERE S.room number = 101) INTERSECT (SELECT T.course id, T.semester, T.year FROM Teaches AS T WHERE T.ID = 83821); c.)  SELECT T.course id FROM takes AS T WHERE T.semester IN (SELECT Z.semester FROM teaches AS Z WHERE Z.ID = 10101) OR T.semester IN (SELECT X.semester FROM section AS X WHERE X.time slot id ='B');

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
icon
Concept explainers
Question

Use the given database to output the results of the following SQL queries:

For these queries you need the student, takes, section, and teaches tables. I gave you all the resources you need.

a.) 

SELECT ∗
FROM Student AS S, Takes AS T
WHERE S.ID = T.ID AND T.semester = 'Fall';

b.) 

(SELECT S.course id, S.semester, S.year
FROM Section AS S
WHERE S.room number = 101)
INTERSECT
(SELECT T.course id, T.semester, T.year
FROM Teaches AS T
WHERE T.ID = 83821);

c.) 

SELECT T.course id
FROM takes AS T
WHERE T.semester IN
(SELECT Z.semester
FROM teaches AS Z
WHERE Z.ID = 10101)
OR
T.semester IN
(SELECT X.semester
FROM section AS X
WHERE X.time slot id ='B');

4 /6 >
100% +
ab]
A.3 Sample Data 1279
dept name
Comp. Si.
Comp. Sci.
History
Finance
Physics
Physics
Williams Comp. Sci.
Music
ID
name
tot.cred
00128 Zhang
102
12345
Shankar
Brandt
32
80
19991
23121
Chavez
110
44553 Peltier
45678 Levy
54321
55739
56
46
54
Sanchez
38
70557
Snow
Physics
Comp. Sci.
Elec. Eng.
Bourikas Elec. Eng.
Biology
76543
76653
Brown
Aoi
58
60
98765
98
98988
Tanaka
120
Figure A.9 The student relation.
course id
00128 CS-101
sec.id semester
grade
ID
year
Fall
Fall
2009
A
00128 CS-347
12345 CS-101
CS-190
1
2009
A-
Fall
2009
12345
12345
Spring
1
Spring
Fall
2
2009
2010
A
CS-315
A
12345
CS-347
19991 HIS-351
23121 FIN-201
1
2009
A
Spring
1
Spring
1
2010
2010
В
C+
PHY-101
45678 CS-101
45678 CS-101
45678
44553
Fall
Fall
2009
F
B-
1
2009
Spring
1
2010
2010
В
2009
B+
CS-319
CS-101
Spring
Fall
54321
54321
1
A-
Spring
Spring
Fall
CS-190
2
2009
B+
55739
MU-199
1
2010
A-
A
76543
2009
CS-101
CS-319
EE-181
CS-101
CS-315
1
76543
2
Spring
2010
A
2009
76653
98765
Spring
1
Fall
2009
C-
98765
Spring
Summer
1
2010
B
BIO-101
BIO-301
98988
2009
98988
1
Summer 2010
null
Figure A.10 The takes relation.
Transcribed Image Text:4 /6 > 100% + ab] A.3 Sample Data 1279 dept name Comp. Si. Comp. Sci. History Finance Physics Physics Williams Comp. Sci. Music ID name tot.cred 00128 Zhang 102 12345 Shankar Brandt 32 80 19991 23121 Chavez 110 44553 Peltier 45678 Levy 54321 55739 56 46 54 Sanchez 38 70557 Snow Physics Comp. Sci. Elec. Eng. Bourikas Elec. Eng. Biology 76543 76653 Brown Aoi 58 60 98765 98 98988 Tanaka 120 Figure A.9 The student relation. course id 00128 CS-101 sec.id semester grade ID year Fall Fall 2009 A 00128 CS-347 12345 CS-101 CS-190 1 2009 A- Fall 2009 12345 12345 Spring 1 Spring Fall 2 2009 2010 A CS-315 A 12345 CS-347 19991 HIS-351 23121 FIN-201 1 2009 A Spring 1 Spring 1 2010 2010 В C+ PHY-101 45678 CS-101 45678 CS-101 45678 44553 Fall Fall 2009 F B- 1 2009 Spring 1 2010 2010 В 2009 B+ CS-319 CS-101 Spring Fall 54321 54321 1 A- Spring Spring Fall CS-190 2 2009 B+ 55739 MU-199 1 2010 A- A 76543 2009 CS-101 CS-319 EE-181 CS-101 CS-315 1 76543 2 Spring 2010 A 2009 76653 98765 Spring 1 Fall 2009 C- 98765 Spring Summer 1 2010 B BIO-101 BIO-301 98988 2009 98988 1 Summer 2010 null Figure A.10 The takes relation.
Packard
117% O |+| I
ab
3 /6 >
course id
sec id
semester
year
building
room.number
time slot id
BIO-101
1.
Summer
Summer
Fall
2009
2010
2009
2010
Painter
514
B
BIO-301
CS-101
CS-101
Painter
514
A
Packard
Packard
101
H
Spring
101
F
Spring
Spring
Spring
Spring
Spring
Fall
Spring
Spring
Spring
Spring
Fall
CS-190
Taylor
Taylor
Watson
2009
3128
E
CS-190
CS-315
CS-319
CS-319
CS-347
EE-181
FIN-201
HIS-351
2009
3128
2010
120
2010
Watson
100
Taylor
Taylor
Taylor
2010
3128
2009
3128
2009
3128
2010
101
Painter
Packard
2010
514
MU-199
2010
101
PHY-101
2009
Watson
100
A
Figure A.7 The section relation.
course id
sec id
semester
ID
year
10101
10101
10101
12121
15151
22222
32343
45565
45565
76766
CS-101
Fall
2009
2010
CS-315
1
Spring
Fall
CS-347
2009
Spring
Spring
Fall
FIN-201
2010
MU-199
2010
PHY-101
HIS-351
CS-101
CS-319
2009
Spring
Spring
Spring
Summer
Summer
2010
2010
2010
BIO-101
BIO-301
CS-190
CS-190
CS-319
2009
76766
83821
83821
2010
Spring
Spring
Spring
Spring
2009
2009
2010
2009
83821
98345
EE-181
Figure A.8 The feaches relation.
Transcribed Image Text:Packard 117% O |+| I ab 3 /6 > course id sec id semester year building room.number time slot id BIO-101 1. Summer Summer Fall 2009 2010 2009 2010 Painter 514 B BIO-301 CS-101 CS-101 Painter 514 A Packard Packard 101 H Spring 101 F Spring Spring Spring Spring Spring Fall Spring Spring Spring Spring Fall CS-190 Taylor Taylor Watson 2009 3128 E CS-190 CS-315 CS-319 CS-319 CS-347 EE-181 FIN-201 HIS-351 2009 3128 2010 120 2010 Watson 100 Taylor Taylor Taylor 2010 3128 2009 3128 2009 3128 2010 101 Painter Packard 2010 514 MU-199 2010 101 PHY-101 2009 Watson 100 A Figure A.7 The section relation. course id sec id semester ID year 10101 10101 10101 12121 15151 22222 32343 45565 45565 76766 CS-101 Fall 2009 2010 CS-315 1 Spring Fall CS-347 2009 Spring Spring Fall FIN-201 2010 MU-199 2010 PHY-101 HIS-351 CS-101 CS-319 2009 Spring Spring Spring Summer Summer 2010 2010 2010 BIO-101 BIO-301 CS-190 CS-190 CS-319 2009 76766 83821 83821 2010 Spring Spring Spring Spring 2009 2009 2010 2009 83821 98345 EE-181 Figure A.8 The feaches relation.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 7 steps with 14 images

Blurred answer
Knowledge Booster
Query Syntax
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
  • SEE MORE 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