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

From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Mon, 20 Jun 2005 22:38:58 GMT
Message-ID: <6AHte.125958$a67.7010345_at_phobos.telenet-ops.be>


vc wrote:

> Jan Hidders wrote:

>> vc wrote:
>>
>>> In short,  it appears that FDM uses the same data model as the
>>> OODB does (ignoring minor syntactical and terminological
>>> differences,  like 'entity' vs. 'class').

>>
>> If you restrict yourself to the structural side of the data model,
>> i.e., how data is structured, then they are the same. (With the
>> additional remark that we are looking at the pure OODB data model,
>> for the impure model, as defined by e.g. IFO or the related IQL
>> data model, the relationship is not that simple.) But in this case
>> the query languages are wildly different; where Java is imperative
>> DAPLEX is a declarative functional language.
> 
> In Java (assuming 'employees' is a collection):
> 
> for (employee emp : employees) System.out.print(emp.getName(),
> emp.getAge(), emp.getDepartment().getBuilding().getName())
> 
> How is it different from Daplex ?

This particular subset of Java is indeed not that different. And it is not a concidence that this subset doesn't use side-effects, assignments, or iterations, except perhaps for the print method, but that is somewhat a special case. See below.

>>> "Navigational" is probably not a good word.  I should have
>>> written that a Daplex query produces items ('print') in an
>>> imperative way:
>>> 
>>> 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.

>>> ... 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.

>> 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? :-)

  • Jan Hidders
Received on Tue Jun 21 2005 - 00:38:58 CEST

Original text of this message