Re: Dreaming About Redesigning SQL
From: Mikito Harakiri <mikharakiri_at_yahoo.com>
Date: 8 Oct 2003 09:45:43 -0700
Message-ID: <bdf69bdf.0310080845.4d71a1f0_at_posting.google.com>
Date: 8 Oct 2003 09:45:43 -0700
Message-ID: <bdf69bdf.0310080845.4d71a1f0_at_posting.google.com>
paul_geoffrey_brown_at_yahoo.com (Paul G. Brown) wrote in message news:<57da7b56.0310080006.47b550a9_at_posting.google.com>...
> RELATION Dept ( Id Dept_Id KEY, Name String );
> RELATION Emp ( Id Emp_Id KEY, Dept REF(Dept),
> Name PersonName, Salary Money );
>
> RETRIEVE E.Name, DEREF(E.Dept).Name FROM Emp E;
>
> RETRIEVE E.Name FROM Emp E, Dept D
> WHERE DEREF(E.Dept).Id = E.Id AND D.Name = 'shoe';
I'm not sure I understand what DEREF(E.Dept).Id = E.Id predicate is saying. Are you matching Employee id against Department id? Therefore, if ref/deref is indeed just a syntactic sugar around foreign key constraint, what is the syntax for join predicate? Received on Wed Oct 08 2003 - 18:45:43 CEST