| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Unknown SQL
Roedy Green wrote:
>
> On Wed, 30 May 2001 18:02:37 GMT, Mikito Harakiri
> <nospam_at_newsranger.com> wrote or quoted :
>
> >find all employees who earn more
> >than their managers".
>
> Was this famous for ambiguity or for difficulty to compute?
In hierarchical data models (and some object dbms's), managers and employees are arranged in tree -- employees under managers. Employee entities can only be reached through their associated manager. In such a system, this query must be expressed an iteration through each manager and then processing each employee under the manager looking for 'over-acheivers'.
In a relational system, you can express it either way, including the more intuitive --- iterate through each employee and retrieve those who make more than their associated manager.
-- Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com) =================================================================== * Check out Database Debunkings (http://www.firstsql.com/dbdebunk/) * "The Forum Where Database Matters Are Set Straight"Received on Thu May 31 2001 - 01:07:53 CDT
![]() |
![]() |