Provide the MySQL commands for the following queries. Make sure that your queries produce the exact output as shown (row order can be different). Redo Q4, except also showing the name for the instructor's department in the following manner. +--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+ | stuId | fname | lname | major | classId | Instructor deptCode | course | grade | +--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+ | 100005 | Linda | Johnson | CINF | 10003 | CSCI | Introduction to Information Systems | NULL | | 100005 | Linda | Johnson | CINF | 10004 | CSCI | Web Application Development | A- | | 100005 | Linda | Johnson | CINF | 10005 | CINF | Database Development | A- | | 100005 | Linda | Johnson | CINF | 10006 | ITEC | Introduction to Scripting | B+ | | 100006 | Lillian | Johnson | CINF | 10004 | CSCI | Web Application Development | C+ | | 100006 | Lillian | Johnson | CINF | 10005 | CINF | Database Development | A | | 100000 | Tony | Hawk | CSCI | 10000 | CSCI | Data Structures | A | | 100000 | Tony | Hawk | CSCI | 10001 | CSCI | Design of Database Systems | A | | 100000 | Tony | Hawk | CSCI | 10002 | CSCI | DBMS | B+ | | 100000 | Tony | Hawk | CSCI | 10003 | CSCI | Introduction to Information Systems | C | | 100000 | Tony | Hawk | CSCI | 10004 | CSCI | Web Application Development | A- | | 100000 | Tony | Hawk | CSCI | 11001 | CSCI | Design of Database Systems | D | | 100001 | Mary | Hawk | CSCI | 10000 | CSCI | Data Structures | NULL | | 100001 | Mary | Hawk | CSCI | 10001 | CSCI | Design of Database Systems | A- | | 100002 | David | Hawk | CSCI | 10000 | CSCI | Data Structures | B- | | 100002 | David | Hawk | CSCI | 10002 | CSCI | DBMS | B+ | | 100002 | David | Hawk | CSCI | 10003 | CSCI | Introduction to Information Systems | D | | 100004 | Larry | Johnson | ITEC | 10003 | CSCI | Introduction to Information Systems | A | | 100004 | Larry | Johnson | ITEC | 10004 | CSCI | Web Application Development | B+ |

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter4: Constraints
Section: Chapter Questions
Problem 3MC: Which of the following SQL statements is invalid and returns an error message? ALTER TABLE books ADD...
icon
Related questions
Question
100%

Provide the MySQL commands for the following queries. Make sure that your
queries produce the exact output as shown (row order can be different). 

 

Redo Q4, except also showing the name for the instructor's department in the
following manner.
+--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+
| stuId | fname | lname | major | classId | Instructor deptCode | course | grade |
+--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+
| 100005 | Linda | Johnson | CINF | 10003 | CSCI | Introduction to Information Systems | NULL |
| 100005 | Linda | Johnson | CINF | 10004 | CSCI | Web Application Development | A- |
| 100005 | Linda | Johnson | CINF | 10005 | CINF | Database Development | A- |
| 100005 | Linda | Johnson | CINF | 10006 | ITEC | Introduction to Scripting | B+ |
| 100006 | Lillian | Johnson | CINF | 10004 | CSCI | Web Application Development | C+ |
| 100006 | Lillian | Johnson | CINF | 10005 | CINF | Database Development | A |
| 100000 | Tony | Hawk | CSCI | 10000 | CSCI | Data Structures | A |
| 100000 | Tony | Hawk | CSCI | 10001 | CSCI | Design of Database Systems | A |
| 100000 | Tony | Hawk | CSCI | 10002 | CSCI | DBMS | B+ |
| 100000 | Tony | Hawk | CSCI | 10003 | CSCI | Introduction to Information Systems | C |
| 100000 | Tony | Hawk | CSCI | 10004 | CSCI | Web Application Development | A- |
| 100000 | Tony | Hawk | CSCI | 11001 | CSCI | Design of Database Systems | D |
| 100001 | Mary | Hawk | CSCI | 10000 | CSCI | Data Structures | NULL |
| 100001 | Mary | Hawk | CSCI | 10001 | CSCI | Design of Database Systems | A- |
| 100002 | David | Hawk | CSCI | 10000 | CSCI | Data Structures | B- |
| 100002 | David | Hawk | CSCI | 10002 | CSCI | DBMS | B+ |
| 100002 | David | Hawk | CSCI | 10003 | CSCI | Introduction to Information Systems | D |
| 100004 | Larry | Johnson | ITEC | 10003 | CSCI | Introduction to Information Systems | A |
| 100004 | Larry | Johnson | ITEC | 10004 | CSCI | Web Application Development | B+ |
+--------+---------+---------+-------+---------+---------------------+-------------------------------------+-------+

MariaDB [toyu2]> select * from grade;
| grade | gradePoint |
ΤΑ
| A-
B
B+
B-
C
JUODÓLA.
D+
D-
| F
IP
NULL
NULL
NULL |
-+
15 rows in set (0.001 sec)
MariaDB [toyu2]> select from school;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
MariaDB [toyu2]> select * from school;
| schoolCode | schoolName
| Business
Education
| P
| WX
4.0000
3.6667
3.0000
3.3333
2.6667
2.0000
2.3333
1.6667
1.0000
| BUS
EDU
1.3333
0.6667
0.0000
Human Sciences and Humanities
İScience and Engineering
HSH
| CSE
4 rows in set (0.000 sec)
MariaDB [toyu2]> select * from student;
| stuId | fname
| 100000 | Tony
| 100001 | Mary
100002| David
100003 | Catherine
100004 | Larry
100005 | Linda
100006 | Lillian
100007 | Ben
| 100008 | Bill
100009 | Linda
| 100111 | Cathy
11 rows in set (0.000 sec)
| 1name | major | minor | credits | advisor |
1011 |
1011
Hawk
Hawk
Hawk
| Lim
Johnson
Johnson
Johnson
Zico
Ching
King
CSCI
CSCI
CSCI
ITEC
ITEC
CINF
CINF
NULL
ARTS
ARTS
CINF
CINF
ITEC
CINF
NULL
ENGL
ITEC
NULL
NULL
CSCI
Johanson NULL | NULL
40
35
66
20
66
13 |
18 |
16 |
90 |
125 |
0|
1012
NULL
1017
1015
1016
NULL
NULL
1018
1018
Transcribed Image Text:MariaDB [toyu2]> select * from grade; | grade | gradePoint | ΤΑ | A- B B+ B- C JUODÓLA. D+ D- | F IP NULL NULL NULL | -+ 15 rows in set (0.001 sec) MariaDB [toyu2]> select from school; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that MariaDB [toyu2]> select * from school; | schoolCode | schoolName | Business Education | P | WX 4.0000 3.6667 3.0000 3.3333 2.6667 2.0000 2.3333 1.6667 1.0000 | BUS EDU 1.3333 0.6667 0.0000 Human Sciences and Humanities İScience and Engineering HSH | CSE 4 rows in set (0.000 sec) MariaDB [toyu2]> select * from student; | stuId | fname | 100000 | Tony | 100001 | Mary 100002| David 100003 | Catherine 100004 | Larry 100005 | Linda 100006 | Lillian 100007 | Ben | 100008 | Bill 100009 | Linda | 100111 | Cathy 11 rows in set (0.000 sec) | 1name | major | minor | credits | advisor | 1011 | 1011 Hawk Hawk Hawk | Lim Johnson Johnson Johnson Zico Ching King CSCI CSCI CSCI ITEC ITEC CINF CINF NULL ARTS ARTS CINF CINF ITEC CINF NULL ENGL ITEC NULL NULL CSCI Johanson NULL | NULL 40 35 66 20 66 13 | 18 | 16 | 90 | 125 | 0| 1012 NULL 1017 1015 1016 NULL NULL 1018 1018
MariaDB [toyu2]> select * from department;
| deptCode | dept Name
ACCT
ARTS
CINF
CINF
CSCI
ENGL
ITEC
MATH
7 rows in set (0.000 sec)
MariaDB [toyu2]> select * from enroll;
| stuId
classId | grade | n_alerts
100000
100001
100002
100000
100000
L
100001
100001
100000
100000
100002
100002
100000
100000
100002
100004
100005
100000
100004
100000
100005
100000
100006
100000
100005
100000
| 100006
100005
100005
100007
| 100007
100008
100007
100000
Accounting
Arts
Computer Information Systems
Computer Science
English
Information Technology
Mathematics
10000 A
10000 NULL
10000
10001
1000
10001
10001
10002
10002
10003
10000
10002 B+
10002
DT
B-
B-
10003
D
10005
10003 A
2000
10005
B+
D+
10003
10004 A-
B+
10004
www
10004
A-
2000
10004 C+
A-
NULL
2000
10005
10000
10006 B+
1011 Paul
1012 Mary
1013 David
1014 Sharon
1015
Daniel
1016
Andrew
4047
1017 | Deborah
1018 Art
10007
0007
10007 C-
10008 A-
11001
Benjamin
Katrina
Smith
Tran
Love
Mannes
Kim
Byre
Gump
NULL
2
2
Ø
22 rows in set (0.000 sec)
MariaDB [toyu2]> select * from faculty;
| facId fname
1019
Yu
1020
Bajaj
1021 Jorginlo | Neymar
!
1
11 rows in set (0.001 sec)
2
2
A
1
A
NULL
1
NULL
NULL
NULL
NULL
4
0
4
1name | deptCode | rank
CINF
ITEC
Allister ARTS
ITEC
ENGL
ACCT
CSCI
CSCI
CSCI
CSCI
CINE
CINF
| schoolCode | numStaff
BUS
HSH
CSE
CSE
HSH
CSE
CSE
Professor
Associate Professor
NULL
Assistant Professor
Professor
Associate Professor
Professor
Assistant Professor
Lecturer
Lecturer
Assistant Professor
10
Transcribed Image Text:MariaDB [toyu2]> select * from department; | deptCode | dept Name ACCT ARTS CINF CINF CSCI ENGL ITEC MATH 7 rows in set (0.000 sec) MariaDB [toyu2]> select * from enroll; | stuId classId | grade | n_alerts 100000 100001 100002 100000 100000 L 100001 100001 100000 100000 100002 100002 100000 100000 100002 100004 100005 100000 100004 100000 100005 100000 100006 100000 100005 100000 | 100006 100005 100005 100007 | 100007 100008 100007 100000 Accounting Arts Computer Information Systems Computer Science English Information Technology Mathematics 10000 A 10000 NULL 10000 10001 1000 10001 10001 10002 10002 10003 10000 10002 B+ 10002 DT B- B- 10003 D 10005 10003 A 2000 10005 B+ D+ 10003 10004 A- B+ 10004 www 10004 A- 2000 10004 C+ A- NULL 2000 10005 10000 10006 B+ 1011 Paul 1012 Mary 1013 David 1014 Sharon 1015 Daniel 1016 Andrew 4047 1017 | Deborah 1018 Art 10007 0007 10007 C- 10008 A- 11001 Benjamin Katrina Smith Tran Love Mannes Kim Byre Gump NULL 2 2 Ø 22 rows in set (0.000 sec) MariaDB [toyu2]> select * from faculty; | facId fname 1019 Yu 1020 Bajaj 1021 Jorginlo | Neymar ! 1 11 rows in set (0.001 sec) 2 2 A 1 A NULL 1 NULL NULL NULL NULL 4 0 4 1name | deptCode | rank CINF ITEC Allister ARTS ITEC ENGL ACCT CSCI CSCI CSCI CSCI CINE CINF | schoolCode | numStaff BUS HSH CSE CSE HSH CSE CSE Professor Associate Professor NULL Assistant Professor Professor Associate Professor Professor Assistant Professor Lecturer Lecturer Assistant Professor 10
Expert Solution
steps

Step by step

Solved in 2 steps

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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning