Friday, February 24, 2012

i need help with relaitonal algebra

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)Hi,

I hope this will work out for U,

1. SELECT sname
From Student
, Course
, Attendance
WHERE
Student.Student# = Attendance.Student# and
Course.Course# = Attendance.Course# and
Course.cname Like 'advance database' and
Student.degreetype like 'professional Pathway';

2. SELECT sname
From Student
, Course
, Attendance
WHERE
Student.Student# = Attendance.Student# and
Course.Course# = Attendance.Course# and
Course.cname in ('advance database') and
Student.degreetype in ('professional Pathway');|||Hi Satish,

I actaully want to SQL written in relational algebra!!

Originally posted by satish_ct
Hi,

I hope this will work out for U,

1. SELECT sname
From Student
, Course
, Attendance
WHERE
Student.Student# = Attendance.Student# and
Course.Course# = Attendance.Course# and
Course.cname Like 'advance database' and
Student.degreetype like 'professional Pathway';

2. SELECT sname
From Student
, Course
, Attendance
WHERE
Student.Student# = Attendance.Student# and
Course.Course# = Attendance.Course# and
Course.cname in ('advance database') and
Student.degreetype in ('professional Pathway');|||Sorry for my lack of knowledge, but what is relational algebra like ?

No comments:

Post a Comment