Sanity check - BinaryLink searches

Ed Kleban Ed at Kleban.com
Mon Dec 12 22:39:30 CST 2005


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.

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

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.

That correct?





More information about the Valentina mailing list