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: Expressing SQL in relational algebra

Re: Expressing SQL in relational algebra

From: Neo <neo55592_at_hotmail.com>
Date: 18 Mar 2003 10:14:47 -0800
Message-ID: <4b45d3ad.0303181014.20673443@posting.google.com>


> > SQL: "SELECT * FROM T_Person WHERE (age=20) AND (weight=180);
>
> Relational Algebra:
> T_Person | age=Years(20) AND weight=Pounds(180)),
> RESTRICT(T_Person,age=Years(20) AND weight=Pounds(180)),
> T_Person WHERE ( age=Years(20) AND weight=Pounds(180) )
>
> > SQL: "SELECT * FROM T_Car JOIN
> > T_Part ON T_Car.ID = T_Part.CarID WHERE T_Part.Color = 'red'";
>
> Relational Algegra:
> ((T_Car RENAME ID AS CarID) JOIN (T_Part)) WHERE Color = Color('Red')

What is the advantage of expressing a query in relational algebra? Received on Tue Mar 18 2003 - 12:14:47 CST

Original text of this message

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