Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part A Consider the following relational schema: Student (student-id, student-name, department) Course (course-id, semester, location, enrolled_number, instructor, department) Faculty (faculty-id, faculty-name, department) Prerequisite (course-id, prereq-course-id)

image text in transcribed

Part A Consider the following relational schema: Student (student-id, student-name, department) Course (course-id, semester, location, enrolled_number, instructor, department) Faculty (faculty-id, faculty-name, department) Prerequisite (course-id, prereq-course-id) CourseScore (student-id, course-id, score) Assume that: All students and faculty members must major/work in one department; One course can have more than one prerequisites; Scores are numbers in [0,100] Instructor in Course table is a subset of faculty-id in Faculty table. Write each of the following queries using Query-by-Example (QBE). If you believe any one of the following is not expressible in QBE, informally explain why it cannot be expressed. 1. 2. (10 pts) Print all names of students who have taken both CS348 and CS252. (10 pts) Print all students with their ids and names who have more than the average score of all students of course id 'CS348' (10 pts) Print the course-ids of which have a prerequisite course of other departments. (10 pts) Print the name of the faculty member that teach most unique courses. (10 pts) Delete the courses that have average(over all semesters) enrolled number less than 5. 3. 4. 5. Part A Consider the following relational schema: Student (student-id, student-name, department) Course (course-id, semester, location, enrolled_number, instructor, department) Faculty (faculty-id, faculty-name, department) Prerequisite (course-id, prereq-course-id) CourseScore (student-id, course-id, score) Assume that: All students and faculty members must major/work in one department; One course can have more than one prerequisites; Scores are numbers in [0,100] Instructor in Course table is a subset of faculty-id in Faculty table. Write each of the following queries using Query-by-Example (QBE). If you believe any one of the following is not expressible in QBE, informally explain why it cannot be expressed. 1. 2. (10 pts) Print all names of students who have taken both CS348 and CS252. (10 pts) Print all students with their ids and names who have more than the average score of all students of course id 'CS348' (10 pts) Print the course-ids of which have a prerequisite course of other departments. (10 pts) Print the name of the faculty member that teach most unique courses. (10 pts) Delete the courses that have average(over all semesters) enrolled number less than 5. 3. 4. 5

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_2

Step: 3

blur-text-image_3

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions

Question

What is focal length? Explain with a diagram and give an example.

Answered: 1 week ago

Question

What is physics and how does it apply in daily life?

Answered: 1 week ago

Question

What is the relation of physical mathematics with examples?

Answered: 1 week ago