Collections

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jan 2 12:15:38 CST 2006


On 1/2/06 11:59 AM, "Philip Mötteli" <philip.moetteli at econophone.ch> wrote:

Hi Philip,

>> Yes, but for collections we MUST NOT use BLOBs of course.
>> 
>>     I consider 2 types of collections:
>>     b) collection which keep in fact pointers to other objects.
>> 
>> In relational model such info mirrored as third table to do M:M link.
>> 
>> In Valentina we offer new feature: BinaryLink.
> 
> Some questions:
> 
> - Why do you call them "Binary Links"?

Because we have on top level abstraction link.

Link do links 2 or more tables in theory.

Valentina 2 have links for 2 tables for now. This is why BinaryLinks.
Actually we have here little collision.

We have hierarchy of classes as:

    VLink
        
        VLink_2
                
            ForeignKey
            ObjectPtr
            BinaryLink

        VLink_N -- not implemented

So Link_2 is top abstraction of any link between 2 tables.
BinaryLink - is some particular link.

> - That's a coincidence, that on page 17 of VKernel, every BinaryLink
> also has an attribute in T(1)?

Do you mean      pict. M : M links using Binary Link ?

No. 

 a1, a2 -- this are custom fields of table T1. This is not attributes of
            BinaryLink.


> - So I could make a table, that has no attribute at all, but many
> BinaryLinks to many records in many tables, even including to records
> of itself?

Well, 

 "table, that has no attribute at all" -- this is prohibited construction
    from relational point of view.

Technically we can do this it seems. And probably AddRecord() will work.
Such table has only bitmap of deleted records...But I think we have never
try this :-)


> - BinaryLinks are like BLOBs or VarBinaries not fixed in its length/
> numbers?

BinaryLinks are NOT BLOBs in any way.

You can think about them as old good known MM table with 2 fields

           [ ptr_A, ptrB ]

Difference is only in internal structures, and, of course, that DBMS know it
not as table but link.

Think in next way: 
    BinaryLink is array of pairs (ptr1, ptr2).
    it can have ANY number of such pairs.
    it can do effective searches.

> - Does every BinaryLink of every record has a separate name or do
> have all BinaryLinks of a table have the same name?

Second.

Let You have Table "Person" and "Phones".

Now you create new BinaryLink "PersoHasPhones".

 
> I think, it would help me, if I had some C++ header files now.

You can download them at
    http://paradigmasoft.com/en/products/download/beta/VSDK



-- 
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-beta mailing list