Using Binary Link or Object Pointer?

Ivan Smahin IvanSmahin at public.kherson.ua
Sat Jun 9 03:40:07 CDT 2007


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.







-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list