Sanity check - BinaryLink searches
Ed Kleban
Ed at Kleban.com
Tue Dec 13 08:56:18 CST 2005
On 12/13/05 8:37 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
> On 12/13/05 4:26 PM, "Ed Kleban" <Ed at Kleban.com> wrote:
>
>> "A stable sort is one that preserves the relative order of items with equal
>> keys. Suppose that you sort an array of objects first on one property, then
>> on a second. A stable sort will preserve the first sort order when it
>> performs the second."
>>
>> In this context, the records of a table are inherently first sorted by order
>> of links added to the Links table.
>
> I afraid you think to hard here.
I usually do :)
> you have LEFT recid 1 which is linked to recids from RIGHT 3, 5, 7, 9
>
> Point.
>
> So you have
>
> 1 linked to { 3, 5, 7, 9 }
>
> NEVER mind order of adding records into RIGHT TABLE.
> NEVER mind order of links establishing.
>
> You always have
>
> 1 linked to { 3, 5, 7, 9 }
>
Sure, but I just want to make sure that if I have a MANY:MANY link and I
never delete records, and:
I link LeftRid #1 to { 3, 9, 5, 8, 7 } IN THAT ORDER
and I link { 1, 9, 6, 3, 2 } to rightRid #7 IN THAT ORDER
That when I do a FindLinked( 1, left, right ) I will get an arrayset with:
{ 3, 9, 5, 8, 7 } IN THAT ORDER
And when I do a FindLinked( 7, right, left ) I will get an arrayset with:
{ 1, 9, 6, 3, 2 } IN THAT ORDER
And everything I read in your reply suggested, "Yes, this is the case"
Until I read:
> given left field -- cannot be linked 2 times with the same right recid
Oh wait, you say "SAME right RecId"... Ah, I see now. Yes. I agree. I
will never do this. And if I do it won't matter.
Ok. Enough said I think.
Thanks for the clarification.
--Ed
I will get an Arrayset with { 3, 9, 5, 8, 7 } in that
More information about the Valentina
mailing list