Using Binary Link or Object Pointer?

Jochen Kötter jochen-koetter at gmx.de
Sun Jun 10 03:44:24 CDT 2007


Thank you, Ivan.

Greetings
Jochen Koetter

> Hello Jochen,
>
> Saturday, June 9, 2007, 11:07:45 AM, you wrote:
>
>> Hi Ruslan,
>
>> I read, you prefer Binary Links when using m:n relation
>
> Actually, BinaryLink is the only link which is able to manage M::M  
> links.
>
>> and
>> ObjectPointers when using 1:m relation. What is the advantage in
>> using ObjectPointers instead of BinaryLinks for 1:m ?
>
> Shortly I would say:
> 1.   If  you  have  no natural key-candidates (some meaningful fields)
> for  RDB  link,  then  better  use  ObjectPtr or BinaryLink instead of
> introducing some synthetic key-pair.
>
> 2. ObjectPtr or BinaryLink.
> Generally   speaking,   you   can  use either of them (But for M::M  
> link -
> it   can   be  BinaryLink  only).
> Advantages could be considered as disadvantages and vice versa...
>
> Example:
> ObjectPtr is not only the link but the field too. So
> 1.    Strictly   speaking,   ObjectPtr   is   a  synthetic  field  (no
> meaningful  data  there).  Seems  to  be  disadvantage  comparing  to
> BinaryLink.
>
> 2.  But you can add/update record and link it to some record in target
> table in a single hop.
>
> INSERT INTO T1 (OBjectPtrField, f1) VALUES ( 1, 'data' )
>
> Seems  to  be  advantage  comparing  to BinaryLink.
>
>
> And so on.
>



More information about the Valentina mailing list