If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > i need help with relaitonal algebra

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-11-03, 14:27
dt236 dt236 is offline
Registered User
 
Join Date: Nov 2003
Location: london uk
Posts: 5
Angry 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)
Reply With Quote
  #2 (permalink)  
Old 11-13-03, 03:21
satish_ct satish_ct is offline
Registered User
 
Join Date: Nov 2003
Location: Bangalore, INDIA
Posts: 333
Thumbs up

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');
__________________
SATHISH .
Reply With Quote
  #3 (permalink)  
Old 11-13-03, 04:24
dt236 dt236 is offline
Registered User
 
Join Date: Nov 2003
Location: london uk
Posts: 5
i want in relational algebra

Hi Satish,

I actaully want to SQL written in relational algebra!!

Quote:
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');
Reply With Quote
  #4 (permalink)  
Old 11-13-03, 04:30
cvandemaele cvandemaele is offline
Registered User
 
Join Date: Oct 2003
Location: Switzerland
Posts: 140
Sorry for my lack of knowledge, but what is relational algebra like ?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On