Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relational schema: Department(deptid, dname, location) Student(snum, sname, deptid, age) Faculty(fid, fname, deptid) Class(cname deptid, meets at, room, faculty) Enrolled(snum, cname, score, grade)

image text in transcribed
Consider the following relational schema: Department(deptid, dname, location) Student(snum, sname, deptid, age) Faculty(fid, fname, deptid) Class(cname deptid, meets at, room, faculty) Enrolled(snum, cname, score, grade) Assume that: All students and faculty members must major/work in one depart- ment; - Faculty teach courses only in the department they belong to; - The names of the courses are unique for each department Scores are numbers in [0,100]; Faculty in Table Class is a subset of fid in Table Faculty. 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 ex- plain why it cannot be expressed. 1. (15 pts) Print the names of the department(s) that have more courses 2. (10 pts) Print the ids and names of the students along with their 3. (15 pts) Print the names of the faculty members who instruct at least than the CS department(deptid-101). scores and grades in each course they have enrolled two courses

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

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions