Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment is about using SQL to write queries FOR ACCESS. FOR PART D,E,F The university database has the following schema. This is intended to

This assignment is about using SQL to write queries FOR ACCESS.

FOR PART D,E,F

image text in transcribed

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. STUDENT(SSN, SNAME, MAJOR, DOB, ADDRESS) COURSE (CID, CNAME, CREDIT) ENROLLED (SSN, CID, GRADE) FACULTY (SSN, NAME, DOB) TEACHING (FACULTYSSN, CID) PREQ(CID, PREREQUISITECID, PASSINGGRADE) Write each query in SQL: (a) What are the names of students who enrolled in a course without enrolling in that course's prerequisite? (b) What is the most popular major? (c) Retrieve a summary: for each prerequisite course id, show the number of courses that require it as a prerequisite course. (d) What are the names of courses that have at least two prerequisites? (e) What are the names of courses that have less than five students enrolled in? (f) What are the names of faculties who teach a course and also its prerequisite course? (g) 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

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

More Books

Students also viewed these Databases questions

Question

14-18 Compare the two major types of planning and control tools.

Answered: 1 week ago