Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DATABASE SYSTEM 2. Consider the following database of a university in which several schools offer courses for students school (school-name, school-street) course (course#, course-name, school-name)

DATABASE SYSTEM

image text in transcribed

2. Consider the following database of a university in which several schools offer courses for students school (school-name, school-street) course (course#, course-name, school-name) enroll (studentID, course#, mark, semester, year) student (studentID, name-first, name-last, phone, student-street) Write SQL for the following: (a) List the course# of all the courses for which more than 50 students are enrolled (5 Marks) (b) Find the studentID of all the students who are enrolled in at least one course offered by School of Humanity and are not enrolled in any courses offered by School of Psychology (5 Marks) (c) Find the studentID of all the students who are enrolled in the maximum number of courses. (For example, the school offers 11 courses and a student is allowed to be enrolled in at most 7 courses. 150 students are enrolled in 3 courses. 170 students are enrolled in 4 courses. 230 students are enrolled in 5 courses. No students are enrolled in 6 courses or more. Your query should return the studentID of those 230 students who are enrolled in 5 courses.) (5 Marks) (d) List the names of students who are enrolled in only courses offered by (5 Marks) schools located in the same streets in which the students live (e) List the schools of courses with maximum marks above 90

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

Email is an example of what type of software?

Answered: 1 week ago

Question

2. Compare the sales and service departments at Auto World.

Answered: 1 week ago