Question

Consider the following relations: Student(sID, surName, firstName, campus, email) Course(dept, cNum, name) 
Offering(oID, dept, cNum, term,...

Consider the following relations:

Student(sID, surName, firstName, campus, email)

Course(dept, cNum, name)


Offering(oID, dept, cNum, term, instructor)


Took(sID, oID, grade)

Such as:

Offering[dept, cNum] ⊆ Course[dept, cNum]

Took[sID] ⊆ Student[sID]


Took[oID] ⊆ Offering[oID]

Answer the following query using relational algebra:

  1. Give the Student number of all students who have taken the course number “343” by the department “CS”.
  2. Find sID of all students who have earned some grade over 80 and some grade below 50.
  3. Find the Terms when the course number “369” by the department “CS” was not offered.
  4. Find the Department and course number of courses that have never been offered.

Homework Answers

Answer #1

1)Give the Student number of all students who have taken the course number “343” by the department “CS”:

2)Find sID of all students who have earned some grade over 80 and some grade below 50

3)Find the Terms when the course number “369” by the department “CS” was not offered

4)Find the Department and course number of courses that have never been offered

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Consider the following relations: Student(sID, surName, firstName, campus, email) Course(dept, cNum, name) 
Offering(oID, dept, cNum, term,...
Consider the following relations: Student(sID, surName, firstName, campus, email) Course(dept, cNum, name) 
Offering(oID, dept, cNum, term, instructor)
 Took(sID, oID, grade) Such as: Offering[dept, cNum] ⊆ Course[dept, cNum] Took[sID] ⊆ Student[sID]
 Took[oID] ⊆ Offering[oID] Find the Terms when the course number “369” by the department “CS” was not offered.
MySQL I have the following tables: Students(sid,first_name,last_name,birthday,major,zipcode) Students_Courses(sid,cid,year,semester,grade) Courses(cid,name,credits) use Students_Courses table to find the student...
MySQL I have the following tables: Students(sid,first_name,last_name,birthday,major,zipcode) Students_Courses(sid,cid,year,semester,grade) Courses(cid,name,credits) use Students_Courses table to find the student sid and course cid for whom took the same course more than one time. can you help me with my query select first_name,last_name,name from Students s, Courses c where s.sid,c.cid,ct in ( select sid,cid,count(*) from Students_Courses group by sid,cid having count(*) > 1);
Consider the following relational database:               STUDENT     (STDNO, SNAME, DEPTNO#)             &n
Consider the following relational database:               STUDENT     (STDNO, SNAME, DEPTNO#)               DEP                 (DEPTNO, DNAME)               COURSE        (CORSNO, CNAME, DEPTNO#, CMAX)               ENROLMENT       (STDNO#, CORSNO#, GRADE, EDATE) STUDENT.DEPTNO is the department number of the student. COURSE.DEPTNO is the department number that offers the course. ENROLMENT models the registrations of students in courses (M:M relationship) where the GRADE is the grade obtained by the student in the course. PART I : DATA DESCRIPTION LANGUAGE (DDL) Write DDL commands to create the four...
SQL Data: you can just copy paste it into mysql to. CREATE DATABASE University;USE University; CREATE...
SQL Data: you can just copy paste it into mysql to. CREATE DATABASE University;USE University; CREATE TABLE Student (  sid INT PRIMARY KEY,  name VARCHAR(20) NOT NULL,  address VARCHAR(20) NOT NULL,  major CHAR(2)); CREATE TABLE Professor (  pid INT PRIMARY KEY,  name VARCHAR(20) NOT NULL,  department VARCHAR(10) NOT NULL); CREATE TABLE Course (  cid INT PRIMARY KEY,  title VARCHAR(20) NOT NULL UNIQUE,  credits INT NOT NULL,  area VARCHAR(5) NOT NULL); CREATE TABLE Transcript (  sid INT,  cid INT,  pid INT,  semester VARCHAR(9),  year YEAR,  grade CHAR(1) NOT NULL,  PRIMARY KEY (sid, cid, semester, year),  FOREIGN KEY (sid) REFERENCES Student...
Practice writing SQL queries ----------------------------- For this question, we will consider the following tables about people,...
Practice writing SQL queries ----------------------------- For this question, we will consider the following tables about people, grades, and courses. Your task is to express each of the given queries in SQL. Example data are provided in these tables for your convenience but note that they are only example data. Your queries must work for all potential data residing in the given tables, not just those illustrated here. People (id, name, age, address) --------------------------------------------------- p1 | Tom Martin| 24 | 11,...
Develop an application to support course administration. Read the following detailed description of this application, and...
Develop an application to support course administration. Read the following detailed description of this application, and complete the tasks listed below. *. A course has a unique course number and title, and is assigned to one or more areas of the Computer Science program. Each course has an instructor, at least one teaching or research assistant, an online conference whiteboard, a time (interval), and a capacity (maximum number of participants). A course need not be offered each term, but the...
Consider the following set of requirements for a UNIVERSITY database that is used to keep track...
Consider the following set of requirements for a UNIVERSITY database that is used to keep track of students’ transcripts. This is similar but not identical to the database shown in Figure 1.2: a. The university keeps track of each student’s name, student number, Social Security number, current address and phone number, permanent address and phone number, birth date, sex, class (freshman, sophomore, ..., graduate), major department, minor department (if any), and degree program (B.A., B.S., ..., Ph.D.). Some user applications...
What topics are covered in the following article? Please answer within 5 hours. It is extremely...
What topics are covered in the following article? Please answer within 5 hours. It is extremely urgent!!!!!!!!!!!!!!!!!!!!!!!! --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- BIOETHICS. Bioethics as a field is relatively new, emerging only in the late 1960s, though many of the questions it addresses are as old as medicine itself. When Hippocrates wrote his now famous dictum Primum non nocere (First, do no harm), he was grappling with one of the core issues still facing human medicine, namely, the role and duty of the physician....
Assignment: What are the main arguments in the article? Please answer within 5 hours. It is...
Assignment: What are the main arguments in the article? Please answer within 5 hours. It is extremely urgent!!!!!!!!!!!!!!!!!!!!!!!! --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- BIOETHICS. Bioethics as a field is relatively new, emerging only in the late 1960s, though many of the questions it addresses are as old as medicine itself. When Hippocrates wrote his now famous dictum Primum non nocere (First, do no harm), he was grappling with one of the core issues still facing human medicine, namely, the role and duty of the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT