Collection Object (there was a picture...)

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Aug 1 17:10:23 CDT 2006


On 8/1/06 2:10 PM, "Philip Mötteli" <philip.moetteli at econophone.ch> wrote:

> I have another proposition how we could approach the problem (instead
> of looking how Postgres possibly does it): Lets assume the following
> M:M intermediate table:
> 
> MMIntermediate 
>{
>    collectionRecord as ObjectsPtr,
>    nextRecord as RecID,
>    memberRecord as ObjectsPtr
>}

>       ..........    PICTURE ...............


> (For the moment just ignore the 'nextRecord', which is there only to
> create an ordered collection).

okay

> So this MMIntermediate table would play the M:M table, joining the
> collection table (e. g. NSSet) to the destination table of the member
> object (here displayed by taking the root of all Foundation objects:
> NSObject). 

> This would replace the array kind of field, proposed by
> Postgres and Ruslan.

> How would searching work in this case? I mean, here too, I can search
> for a field of the member record, that possibly doesn't exist?

Philip! :-)

And here you have describe nothing else as solution based on inheritance
which I also have show 1-2 days ago. Please find my letter.

* We have some ROOT table  == NSObject

* Tables T1 T2 T3 are inherited from this table.

* Table NSSet simply is linked to records of NSObject table.

    in fact here we get simple case of link M:M between 2 tables
    so we can easy use BinaryLink of Valentina. You see? Advantage #1 !!!
    
    No need for MMIntermediate.

    And if talk about ORDERED LINK, I have already describe idea
    that we can implement very effective ORDERED LINK.
    Some words are in WIKI.

-----------
You see Philip, the biggest news for me is this kind of search by attribute
which can be absent in a table. This is very unusual for Relational model,
and I have not see such kind of search even in ODMG. It seems to be
invention of Apple.

Again, technically it is possible for DBMS also.
Problem is to developer new set of API

I wonder if XML's PATH query language have similar features...


---------------
Next, I think this is the most correct direction to think about.
It is simply mirror objects that you have in NS...

I am more used to C++.

In C++ when I have container of Some objects casted to Parent class,
I can access methods and attributes only of parent classes. You remember
this yes?

It sounds that in Objective-C you can do more flexible things...
Send to NSObject some query/event which it can have and may be no.
Right?

In C++ I also can simulate this behavior easy, just defining in parent class
method like DoEvent( EVENT* e ). C++ do not care what is inside of EVENT


It is possible of course invent build some mechanism for db also...
But it is not first step.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list