Sanity check - BinaryLink searches

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Dec 13 10:35:10 CST 2005


On 12/13/05 6:39 AM, "Ed Kleban" <Ed at Kleban.com> wrote:

Hi Ed,

> A quick sanity check to make sure I have things straight.
> 
> If I create a BinaryLink between:
> TblCar.fldModel and TblOptions.fColor
> 
> And add some some links:
> 
>     ( PintoRid, GreenRid )
>     ( PintoRid,  BlueRid )
>     ( TarusRid, GreenRid )
>     ( TarusRid, BlackRid )
> 
> 
> And then perform a FindLinked( PintoRid, fldModel, fColor )
> 
> Then it is necessarily the case that:
 
> 1) The search will be fast because FindLinked on a BinaryLink is always fast
> because searches on either the left field and searches on the right field
> are always performed using Indexes to perform something fast like a Binary
> search.

yes
 
> 2) The list of Rids returned in the resulting VSet will necessarily be in
> the order that that I defined the links,

Here points: 
    you can get set as VBitSet, then no order at all.
    you an get set as ArraySet then yes.

BUT !!!!!

If you delete in table some record, and later add new, it will REUSE old
RecID. So new record, can be inserted BEFORE older in list of binary link.
 
> and therefore:
> 
> 3) Whatever sorting technique is used for creating the index is a stable
> sort that will preserve the relative order links that have the same Rid
> value for a given left field or a given right field.

Not clear.

    given left field  -- cannot be linked 2 times with the same right recid


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