| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Does Codd's view of a relational database differ from that ofDate&Darwin?[M.Gittens]
Alfredo Novoa schrieb:
>>>for each s in employee >>> print(getName(s), getAge(s), >>>getName(getBuilding(getDepartment(s)))) >> >>What's imperative about this?
This example is equivalent to
select s.name, s.age, s.department.building.name from employee s
>>Where are the assignments?
The same as in SELECT in SQL
>>Where are the >>while loops?
With the same success SELECT in SQL can be considered a loop statement.
Such simple example do not have differences in many data model. Writing
foreach(o:O) {
return(o.property);
}
is the same as writing
SELECT o.property FROM O o
Equivalents exist in most other languages.
Differences appear and are visible only with more complex queries when we add the following features:
- multiple source collections, - constraints - access paths - grouping and aggregation - ...
-- http://conceptoriented.comReceived on Tue Jun 21 2005 - 04:39:37 CDT
![]() |
![]() |