Binary links Re: Question Backlog for Valentina mailing list.

Ed Kleban Ed at Kleban.com
Wed Nov 16 01:16:10 CST 2005


  
>> But I just now read all the doc in both the Kernel and RB Reference about
>> Binary Links and decided I don't have a clue about what they do or how to
>> use 'em.
> 
> They do effectively the same as you do in Relational model with help of
> third Table to establish M:M link.
> 
> What do this table? It just remember pairs  (id1, id2)
> 
> BinaryLink do the same, but use RecIDs and it is NOT a table.
> It is more effective structure.

Hmm, more effective than a table.  Meaning not a linear list of pairs, or
meaning not a list that's the same length as one of the two related tables.
The former I guess.  Hmm... Well, you could certainly make it more efficient
by keeping two separate indexed lists so you could do a binary search in
either direction.  And you could make it more efficient with an indexed list
that pointed to a "bucket" with a block of corresponding related entries so
that when doing a binary search you didn't have the overhead of duplicates,
and once you did the seach you had a linear list of corresponding records.
Yeah, that's probably how I'd do it... if I could avoid the temptation of
hashing the indexes to avoid the log2N cost of the binary search for large
sets of links.





More information about the Valentina mailing list