Question: Convert the following SQL statements to relational algebra: 1 . select * from students; 2 . select city from students; 3 . select major from

Convert the following SQL statements to relational algebra:
1. select * from students;
2. select city from students;
3. select major from students where gpa >3.0;
4. select name, age from students where gpa <3.0 and dept =CS;
5. select S.name, T.courseId
from students as S, takes as T
where S.sid = T.sid and S.dept =CS;
6. select S.name, S.dept, T.cName
from student as S, takes as T
where S.gpa =3.0;
7.(select name
from student
where dept =CS)
intersect
(select name
from student
where gpa >3.0);
8.(select name
from student
where dept =CS)
except
(select name
from student
where gpa >3.0);
9. select S.name, T.name
from student as S, student as T
where S.gpa = T.gpa;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!