Re: Canonical DB
Date: Fri, 23 Jun 2006 22:02:52 +0200
Message-ID: <1k8s5th9ekdk4$.1kmdacv2aggh7.dlg_at_40tude.net>
On Fri, 23 Jun 2006 16:48:45 +0200, mAsterdam wrote:
> Dmitry A. Kazakov wrote:
>> mAsterdam wrote: >> >>>If you don't mind getting your hands dirty: >>>http://technology.amis.nl/blog/?p=1160 mentions >>>some Oracle specifics, in >>>http://www.dbazine.com/oracle/or-articles/tropashko4 >>>Vadim Tropashko discusses two ways "to model a tree >>>in the database". His new book might be on the way >>>to the stores by now, but I did not find a reference. >>>Joe Celko wrote >>>http://www.amazon.com/gp/product/1558609202/102-4421784-8373769?v=glance&n=283155 >> >> Reading such things one should always ask himself: what was lost?
>
> And: what was added?
Right.
>> Any tree built in any way is a tree. >> Once you have it, it will not fully obey RA or >> whatever framework you used. That precisely means: an otherwise legal >> operation applied to a tree may kill it.
>
> I am not a tree-specialist.
>
>> It is so with all complex structures.
> [snip integers]
>
> A correct model would have the constraints
> in place to preserve the invariant of the
> structure while allowing all valid modifications.
Yes. But the problem is (apart from expressing the constraints, which itself might be far from trivial: like an acyclic graph constraint etc), that you might lose the structure. To me this all is the infamous LSP problem. You have some set of things (whatever they be, relations or ellipses) with some structure (algebra), you put a constraint on the set (so you get graphs or circles), and see that some statements about the set become wrong.
My favorite examples always integers, sorry. (:-)), Put n>0 on integers and
you will lose negative inverse.
The point is that it is really, really fundamental. Circles aren't ellipses
though any circle is an ellipse. The structure is different. Same with
trees vs. tables.
> but haven't found a solution (or the conviction
> that it can't be done) yet.
>
> http://www.python.org/2.3/mro.html
>
> and (background)
>
> http://www.webcom.com/haahr/dylan/linearization-oopsla96.html#C3-line
>
> It is a nice (and IMHO very useful) challenge.
> Any takers?
-- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.deReceived on Fri Jun 23 2006 - 22:02:52 CEST