November 11, 2003 at 12:34 pm
I was wondering if someone can help me..
I need to find 3 differnt ways of writing the following SQL in relational algebra:
SELECT sname
From Student, Course, Attendance
WHERE Student.Student# = Attendance.Student# and Course.Course# = Attendance.Course# and Course.cname = "advance database" and Student.degreetype = "professional Pathway"
The query is : find student names that are taking professional pathway degree and are attending the advance database course.
Student (Student#, sname, address, dob,degreetype)
Course(Course#, cname, syllabus, day, time)
Attendance(Student#, Course#, year)
November 14, 2003 at 8:00 am
This was removed by the editor as SPAM
November 18, 2003 at 1:49 pm
SELECT sname
From Student
Join Attendance
On Student.Student# = Attendance.Student#
Join Course
On Course.Course# = Attendance.Course#
Where Course.cname = "advance database"
And Student.degreetype = "professional Pathway"
SELECT sname
From Student
Where Student.degreetype = "professional Pathway"
and Student.Student# In (
Select Attendance.Student#
From Attendance
Join Course
On Course.Course# = Attendance.Course#
Where Course.cname = "advance database")
Once you understand the BITs, all the pieces come together
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply