[DISCUSSION] Object Relational Mapping (ORM) - faulting/collections

Philip Mötteli philip.moetteli at econophone.ch
Sun Oct 14 09:59:52 CDT 2007


Am 14.10.2007 um 16:46 schrieb Ruslan Zasukhin:

> On 14/10/07 3:07 PM, "Philip Mötteli"  
> <philip.moetteli at econophone.ch> wrote:
>
>>>>>
>>>>> I will be happy to get any ideas and feature requests to this  
>>>>> area.
>>>>
>>>> As far as I see, all non-keyed collection type can be modelled,  
>>>> if we
>>>> have just one collection type, adhering to the following criterias:
>>>>
>>>> 1. Must be an ordered (not sorted) collection.
>>>> 2. Elements must not be restricted to a certain type.
>>>> 3. Offering the following functions (ObjC notation):
>>>> 1. -count
>>>> 2. -objectAtIndex:
>>>> 3. -removeObjectAtIndex:
>>>> 4. -insertObject:atIndex:
>>>
>>> Well, please look also on one more DRAFT FEATURE --
>>>     BinaryLinks with ORDER.
>>>
>>> On this page:
>>>
>>> http://www.valentina-db.com/dokuwiki/doku.php?
>>> id=paradigma:public:en:documen
>>> tation:vsql:reference:reference
>>>
>>>
>>> This is low-level structure, which looks be much more effective to
>>> save
>>> pairs (RecID1, RecID2) in ordered way.
>>>
>>> I think it will be interesting for you.
>>
>> Can every element in this array point to another table? I mean,  
>> can I do
>>
>> INSERT INTO LINK link_name(TA,TB) VALUES (recidA1) TO (recidB)  
>> <FIRST|
>> LAST>
>> INSERT INTO LINK link_name(TA,TC) VALUES (recidA2) TO (recidC)  
>> <FIRST|
>> LAST>
>> INSERT INTO LINK link_name(TA,TD) VALUES (recidA3) TO (recidD)  
>> <FIRST|
>> LAST>
>
> Wait.
>
> You have TWO tables TA and TB.
>
> BinaryLink WITH ORDER stored poairs of RecIDs of these 2 tables.
>     nothing more.
>
> It not stores OID...
>
> It seems you ask me if its psosibe to have such BinaryLink based on  
> OIDs.
> Technically yes. But if it have sense? I have not think about this  
> way yet.

I don't know for your internal design. But for me this is the only  
thing that makes sense.
I can put into a collection whatever object I want. Not only objects  
of one type.



More information about the Valentina mailing list