Question: This assignment is about using SQL to write queries. The university database has the following schema. This is intended to be used for a single

This assignment is about using SQL to write queries.

 This assignment is about using SQL to write queries. The university

The university database has the following schema. This is intended to be used for a single year and semester. Primary keys are underlined. The relationships between tables are as you know. bullet STUDENT(SSN, SNAME, MAJOR, DOB, ADDRESS) bullet COURSE (CID, CNAME, CREDIT) bullet ENROLLED (SSN, CID, GRADE) bullet FACULTY (SSN, NAME, DOB) bullet TEACHING (FACULTYSSN, CID) bullet PREQ(CID, PREREQUISITECID, PASSINGGRADE) Write each query in SQL: What are the names of students who enrolled in a course without enrolling in that course's prerequisite? What is the most popular major? Retrieve a summary: for each prerequisite course id, show the number of courses that require it as a prerequisite course What are the names of courses that have at least two prerequisites? What are the names of courses that have less than five students enrolled in? What are the names of faculties who teach a course and also its prerequisite Course? Write a series of SQL statements for creating the university database completely. Each statement ends with a semicolon. The statements need to be in a proper order, so that the foreign key referent exists before the foreign key declaration. Please use appropriate data types

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!