Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relations: Student(snum: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets_at: time, room: string, fid: integer) Enrolled(snum: integer, cname:

Consider the following relations: Student(snum: integer, sname: string, major: string, level: string, age: integer) Class(name: string, meets_at: time, room: string, fid: integer) Enrolled(snum: integer, cname: string) Faculty (fid: integer, fname: string, deptid: integer) The meaning of these relations is straightforward; for example, Enrolled has one record per student-class pair such that the student is enrolled in the class. Write the following queries in MySQL 8.0. No duplicates should be printed in any of the answers.

(1) Find the names of faculty members who do not teach any class. (2) For each age value that appears in Students, find the level value that appears most often. For example, if there are more FR level students aged 18 than SR, JR, or SO students aged 18, you should print the pair (18, FR). (3) Find the number of courses conducted per room. (4) Find the courses conducted in room R128 for which at least one student has enrolled. (5) Find the times at which classes occur for those courses for which at least one student has enrolled.

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

Measure phase of excessive inventory levels (Need references)

Answered: 1 week ago

Question

What is the relationship between humans and nature?

Answered: 1 week ago