Collection Object
Philip Mötteli
philip.moetteli at econophone.ch
Wed Aug 2 19:19:27 CDT 2006
Am 02.08.2006 um 17:49 schrieb Ruslan Zasukhin:
> On 8/1/06 6:37 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.
>>
>> What do they inherit?
>
> Class T1 : public NSObject
> {
> }
>
> What it inherit ?
>
> * Some RTTI ?
> * Ability to be NSObject
>
> Right?
In the dynamic environment/program, they inherit the functionality of
NSObject, which consists of about 150 methods, depending on the
linked libraries.
And again: Not important for collections. I can add to a collection
object an object, that is not inheriting from NSObject and it would
work without a hick. I just have to implement -retain and -release
(btw, I do that all the time, when I add my proxies and faults to
diverse collection objects) or I take a version of NSSet, that
doesn't send these method callbacks.
> The same for tables:
>
> CREATE TABLE T1 inherit NSObject
Yes, but that's the static part of a program. Except if you configure
dynamic things, like triggers or the-like, I don't see the connection
to the collection problem. But anyway, in no way I want to proof you
wrong!!! I just don't want, that you go in a wrong direction for
solving my only obstacle I have with Valentina so far: Collections.
Kind regards
Phil
More information about the Valentina
mailing list