Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5 G ? ? : HW 4 . docx FDB 5 0 2 3 7 2 - 3 HW 4 Specify the following queries in

5G
??:
HW4.docx
FDB
502372-3
HW4
Specify the following queries in SQL on the database schema of Figure below
(a) Retrieve the names of all senior students majoring in 'COSC (computer science).
(b) Retrieve the names of all courses taught by professor King in 85 and 86.
(c) For each section taught by professor King, retrieve the course number, semester, year, and number of students who took the section.
(d) Retrieve the name and transcript of each senior student (Class=5) majoring in COSC. Transcript includes course name, course number, credit hours, semester, year, and grade for each course completed by the student.
(e) Retrieve the names and major departments of all straight A students (students who have a grade of A in all their courses).
(f) Retrieve the names and major departments of all students who do not have any grade of A in any of their courses.
STUDENT
\table[[Name,Student_number,Class,Major],[Smith,17,1,CS],[Brown,8,2,CS]]
COURSE
\table[[Course_name,Course_number,Credit_hours,Department],[Intro to Computer Science,CS1310,4,CS],[Data Structures,CS3320,4,CS],[Discrete Mathematics,MATH2410,3,MATH],[Database,CS3380,3,CS]]
SECTION
\table[[Section_identifier,Course_number,Semester,Year,Instructor],[85,MATH2410,Fall,07,King],[92,CS1310,Fall,07,Anderson],[102,CS3320,Spring,08,Knuth],[112,MATH2410,Fall,08,Chang],[119,CS1310,Fall,08,Anderson],[135,CS3380,Fall,08,Stone]]
GRADE REPORT
\table[[Student_number,Section_identifier,Grade],[17,112,B],[17,119,C],[8,85,A],[8,92,A],[8,102,B],[8,135,A],[,]]
PREREQUISITE
\table[[Course_number,Prerequisite_number],[CS3380,CS3320],[CS3380,MATH2410],[CS3320,CS1310]]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

What aspects would it be impossible to capture?

Answered: 1 week ago

Question

Enhance your words with effective presentation aids

Answered: 1 week ago