Question: 1 . Create a database called abc 2 . Use abc database to create all 6 tables . Provide SQL queries to create all tables.
Create a database called "abc"
Use "abc" database to create all
tables Provide SQL queries to
create all tables.
Insert all samples values into the tables.
Questions : Write SQL queries and their corresponding Relational Algebra
clearly state the subscript and superscript
Tables:
List all courses taught by Professor Taylor.
Find the total number of students enrolled in each course
List the names of all faculty members who teach at least one course with
credits
Find the average salary of all faculty members who are department heads.
List all courses with enrollment counts ordered by the number of enrolled
students
descending order
Find the names of all faculty members who have never taught any course
List all courses along with their departments and the number of students
enrolled in each course in Spring
Find the names of all students who have not enrolled in any course
List all departments along with the total number of faculty members in
each department.
Find the names of all students who are enrolled in more than one course.
List all courses that have not been taught yet.
Find the names of all faculty members who teach courses with more than
credits
Find the average salary of faculty members in each department.
List all courses along with the number of students enrolled in each course taught by Professor Watson.
Find the names of all students who have earned an
A
grade in at least one course. Table : FacultyTeaching Table
tablefacultyidcourseidsection,semester,yearCSFall,CSSpring,CSFall,FINSpring,MUSpring,PHYFall,HISSpring,CSSpring,CSSpring,BIOSummer,BIOSummer,CSSpring,CSSpring,CSSpring,EESpring, Table : DepartmentHeads Table
tabledepartmentheadname,salaryBiologyWatson,Comp Sci.,Taylor,Elec Eng.,Taylor,FinancePainter,HistoryPainter,MusicPackard,PhysicsWatson,
Table : Prerequisites Table
Table : Enrollment Table
tablecourseidstudentidsemester,year,instructor,roomnumber,gradeBIOSummer,Painter,BBIOSummer,Painter,ACSFall,Packard,HCSSpring,Packard,FCSSpring,Taylor,ECSSpring,Taylor,ACSSpring,Watson,DCSSpring,Watson,BCSSpring,Taylor,CSFall,Taylor,AEESpring,Taylor,FINSpring,Packard,BHISSpring,Painter,CMUSpring,Packard,DPHYFall,Watson,A Tables:
Table : Faculty Table
Table : Courses Table
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
