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: VC <boston103_at_hotmail.com>
Date: Tue, 21 Jun 2005 06:25:28 -0400
Message-ID: <O9SdnRO7lIhldyrfRVn-sw@comcast.com>


Hi,

"Alexandr Savinov" <savinov_at_host.com> wrote in message news:42b7e05e$1_at_news.fhg.de...
[...]

>>>>for each s in employee
>>>> print(getName(s), getAge(s),
>>>>getName(getBuilding(getDepartment(s))))
>>>

[...]

> This example is equivalent to
>
> select s.name, s.age, s.department.building.name from employee s

[...]

Well, no. Whilst the SQL above can be interpeted as a relational algebra expression : X = SELECT EMPLOYEE; Y=PROJECT(X, name, age, building), and thus looked upon in an imperative way, there exists an equivalent relational calculus expression which is purely declarative and more natural for those accustomed to reasoning in terms of sets:

(employee.name, employee.age, employee.department):true; -- we did not specify any predicate so the condition is true.

Now, one might have looked upon 'for each s in employee' in the Dalog fragment as a predicate describing the entire set of employees (similar to the RC formula), but the 'print' word kills any attempt at such interpretation admitting only imperative/navigational reading with 'for each' being just a loop.

vc Received on Tue Jun 21 2005 - 05:25:28 CDT

Original text of this message

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