Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Create a database called ASG 1 2 . Use ASG 1 to create 6 tables. Provide SQL queries to create all
Create a database called "ASG
Use "ASG to create tables. Provide SQL queries to create all tables. Make sure you define he relations primary keys, foreign keys and other relations corectly.
Insert all sample values in to the tables.
For SQL queries: Answer with SQL qUERIES & relational algebra
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 : 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 Table : FacultyTeaching Table
tablefacultyidcourseidsection,semester,yearCSFall,CSSpring,CSFall,FINSpring,MUSpring,PHYFall,HISSpring,CSSpring,CSSpring,BIOSummer,BIOSummer,CSSpring,CSSpring,CSSpring,EESpring,Create Database called "ASG
Use "ASG DB to create tables, provide SQL queries to create tables Make sure you define the relations primary keys, foreign keys, or any other relations correctly.
Insert all samples values into the tables.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,D
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started