Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following relational database schema: Student = ( SSN , Name, Major ) Course = ( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime ) ,

Given the following relational database schema:
Student =(SSN, Name, Major)
Course =( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime),
where DayTime is of the form MW 1:00-2:00.
Enrollment =(SSN,CourseNumber, Quarter, Grade)// Grade is Letter grade or none(Null).
Express the following queries using SQL statements with a minimum number of operations and
tables.
a. List the SSN and Name of every student who has completed (i.e with a letter grades) the
largest number of courses.
b. List the SSN of every student who only have A in every course they completed ,i.e. every
grade is either Null or A.
Student =(SSN, Name, Major)
Course =( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime),
Enrollment =(SSN,CourseNumber, Quarter, Grade)
c. List the SSN of every student who only have A and no NULL value in every course they
enrolled in.
d. List the SSN of every student who did not earn the grade A in any course enrolled in.
Student =(SSN, Name, Major)
Course =( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime),
Enrollment =(SSN,CourseNumber, Quarter, Grade)
e. List the course numbers of the courses taken by both Ron White and Maryam Craig.
f. List SSN, Name, Quarter, CourseNumber , CourseTitle, and Grade for every student and
course they have enrolled in .
g. List the course numbers of the courses taken by Ron White or by Maryam Craig

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

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

How does this scenario illustrate the process of mainstreaming?

Answered: 1 week ago

Question

What are personal and social media?

Answered: 1 week ago