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

From: VC <boston103_at_hotmail.com>
Date: Mon, 20 Jun 2005 22:11:32 -0400
Message-ID: <J9GdnQcemqCl6irfRVn-iA_at_comcast.com>


"Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message news:6AHte.125958$a67.7010345_at_phobos.telenet-ops.be...
> vc wrote:

>> Jan Hidders wrote:
[...]

>>>> for each s in employee print(getName(s), getAge(s), 
>>>> getName(getBuilding(getDepartment(s))))
>>>
>>> What's imperative about this? Where are the assignments? Where are
>>> the while loops?
>>
>> Why,  the 'print' word of course as I wrote earlier.
>

> For all intents and purposes the 'print' word is just a keyword in
> DAPLEX and could be easily replaced with something like the 'return' in
> XQuery.

That is correct. However, in XQuery, the 'return' is just a 'print' (or an assignment) in disguise. This 'return' thingy, among others, is what makes XQuery 'impure'. Just think about what would be a definition for a function called 'return' in a pure FL ? What kind of mapping would it describe ?

>
>>>> ... which might make one to assume a mental navigational model
>>>> for the entire language, rather than declarative/functional
>>>> ['functional' as in functional programming] one.
>>>
>>> If your above example would be written in ML it would look roughly
>>> the same.
>>
>> I am sure you know that ML is *not* a pure FL and the fragment in 
>> question would be imperative there too thanks to 'print' or whatever
>> ML uses.
>

> From the way I used it you might have guessed that I meant pure ML. The
> print statement is only there to say that you return a concatenation of
> values and that you can do in pure ML.

See above. A 'print', whether it's called 'return' in XQuery, or 'print' in Daplex, or 'write', I believe, in ML is an imperative feature whichever way you look at it.

>
>>> Defining views might be, but it's not clear to me how deep that
>>> problem is. What exactly would a "view" be in this context anyway?
>>
>> You tell me ;)
>

> I don't have to spoon feed you everything, do I? :-)

Why not, just for a change ;)

vc

>
> -- Jan Hidders
Received on Tue Jun 21 2005 - 04:11:32 CEST

Original text of this message