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: Does Codd's view of a relational database differ from that ofDate&Darwin?[M.Gittens]

Re: Does Codd's view of a relational database differ from that ofDate&Darwin?[M.Gittens]

From: Alfredo Novoa <alfredo_novoa_at_hotmail.com>
Date: Tue, 21 Jun 2005 13:05:22 +0200
Message-ID: <e1tfb19c2j0jrt5d6run90rj10m7d92t94@4ax.com>


On Tue, 21 Jun 2005 11:39:37 +0200, Alexandr Savinov <savinov_at_host.com> wrote:

>Alfredo Novoa schrieb:
>>>>for each s in employee
>>>> print(getName(s), getAge(s),
>>>>getName(getBuilding(getDepartment(s))))
>>>
>>>What's imperative about this?
>>
>>
>> Everything!
>
>This example is equivalent to
>
>select s.name, s.age, s.department.building.name from employee s

No, it is equivalent to:

for (int index = 0; index < employee.Count; index++) {
  s = employee[index];
  print(getName(s), getAge(s),
getName(getBuilding(getDepartment(s)))); }

And this is what you get if you decompile that code.

"for each" is only a syntactic shorthand for a "for" loop.

Regards Received on Tue Jun 21 2005 - 06:05:22 CDT

Original text of this message

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