Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: relation algebra query

Re: relation algebra query

From: Cimarron Taylor <cimarron+google_at_taylors.org>
Date: 22 Apr 2002 04:08:12 -0700
Message-ID: <29e28c51.0204220308.4202d943@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US