| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: relation algebra query
Here's how I would do it with the following ascii notation:
projection: R [x, y...]
selection: R [x = y]
join: R [x = y] S
division: R [x / y] S
we can get the names of subjects:
subject[sname]
the ids of all students:
student[sid]
the subjects and ids of students enrolled in in a given year
(enrolled[year=YEAR])[subid, sid]
the subjects and ids of all students in a given year
((enrolled[year=YEAR])[subid, sid]) [sid/sid] (student[sid])
the names of subjects with all students in a given year
(subject [subid=subid] ((enrolled[year=YEAR])[subid, sid])
[sid/sid] (student[sid]) )[sname]
Cim Received on Mon Apr 22 2002 - 06:08:12 CDT
![]() |
![]() |