Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Consider the following GRADEBOOK relational schema describing the data for a

ID: 3700327 • Letter: 1

Question

1. Consider the following GRADEBOOK relational schema describing the data for a grade book of a particular instructor. The attributes A, B, C, and D of COURSES store grade cutoffs (30 points) CATALOG(C#, Ctitle) STUDENT(Sid, Fname, Lname, Minit) COURSES(Term, SecNo, C?A, B, C, D) ENROLLS(Sid, Term, SecNo) Specify the following queries using the Relation Algebra interpreter on the GRADEBOOK database schema: Retrieve the names of students enrolled in the Automata class during the Spring 2018 term Retrieve the Sid values of students who are enrolled in both COP 4710 and COP 2551. Retrieve the Sid values of students who are enrolled in COP 4710 or COP 2551 Retrieve the names of students who are not enrolled in any class. Retrieve the names of students who are enrolled in all courses in the CATALOG table.

Explanation / Answer

1.select Fname,Lname
from STUDENT S
left join ENROLLS E
on S.Sid=E.Sid
left join COURSES C
on E.SecNo=C.SecNo
left join CATALOG CA
on CA.C#=C.C#
where E.Term='Spring 2018' and CA.CTitle='Automata'

2.Select Sid from ENROLLS E
where (Term='COP4710') and (Term='COP2551')

3.select Sid from ENROLLS E
where (Term='COP4710') or (Term='COP2551')

4.select Fname,Lname
from STUDENT S
where S.Sid NOT in(select SID from ENROLLS E)

5.select Fname,Lname
from STUDENT S
left join ENROLLS E
on S.Sid=E.Sid
left join COURSES C
on E.SecNo=C.SecNo
inner join CATALOG CA
on CA.C#=C.C#