Actually, SQL does a mixture of both relational calculus and relational 
algebra, 
but not necessarily all of either.

Seeing the algebra is fairly straightforward, eg the UNION or WHERE etc.

An example of the calculus is seen in SELECT...FROM... involving a JOIN, for 
example:

   SELECT person.name, person.age, department.deptname
   FROM people person
     INNER JOIN departments department ON (department.deptid = person.deptid);

In SQL, each named source in the FROM clause is effectively a FORALL (or 
something) over a set (eg people) which has an associated variable which has 
the 
value of a set element in turn (eg person).

Its commonly misunderstood that declaring an alias in FROM is aliasing the 
whole 
table, but it isn't, rather it is aliasing a single record of the table; if you 
don't have an explicit alias, the record variable defaults to the same name as 
the table.  My above example should make more clear what's going on.

-- Darren Duncan

On 2015-06-15 5:46 PM, Christopher Vance wrote:
> With a relational model you have a choice between relational calculus or
> relational algebra. SQL does one of them.
>
> I have used a language which did the other, long ago in a land far away.
>
> On Tue, Jun 16, 2015 at 9:56 AM, <david at andl.org> wrote:
>
>>>>> I think the best database language should reflect how earthlings think
>> about the data, and the best computer programming language would reflect
>> easily the result we want get from them.
>>
>> Care to expand on that?
>>
>> I'm developing a new database language: Andl. My starting point has been
>> the
>> relational model, Codd-Date-Darwen and The Third Manifesto.  My (only)
>> competitor seems to be SQL, which has a 40+ year lead. Nothing like a
>> challenge!
>>
>> The question is: what should a database language do? Andl can already match
>> or surpass SQL on database programming tasks, but is that interesting
>> enough?
>>
>> What would make a database programming better, or best?
>>
>> Regards
>> David M Bennett FACS
>>
>> Andl - A New Database Language - andl.org

Reply via email to