BinaryLink that keep ORDER

Ed Kleban Ed at Kleban.com
Tue Dec 13 17:49:53 CST 2005




On 12/13/05 9:41 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 12/13/05 4:56 PM, "Ed Kleban" <Ed at Kleban.com> wrote:
> 
>> 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
> 
> No, you will get 
>  
>       { 3, 5, 7, 8, 9 }
> 
>> And when I do a FindLinked( 7, right, left ) I will get an arrayset with:
>>     { 1, 9, 6, 3, 2 }  IN THAT ORDER
> 
> No, you will get 
> 
>       { 1, 2, 3, 6, 9 }
> 

Ok. That's why I kept asking.  I'm glad I did.  This is not what I
understood you saying before.  This suggests that I won't be able to use a
Binary link for at least one of my needs.  I'll have to keep a separate
table of two columns with left links and right links so that I can access
the RecId of records in this table and sort based on that. Hopefully the
efficiency will be similar to that of using a BinaryLink.

>> And everything I read in your reply suggested, "Yes, this is the case"
> 
> No. 
> 
> BinaryLink is like an index. So it keep list of recIDs sorted by values,
> To do binary search.
> 
> ---------------------
> Ed, remember few days ago, I have start talk about
> 
>     BinaryLink that keep ORDER.
> 
 No, unfortunately I do not remember this.  Perhaps you can send me a piece
of the email if you still have it.

> They will do what you want.
> 
> HOW they will do this, I do not know yet, because I see at least 3 ways to
> implement, each have own props/cons.
> 
So this is something new that is not available yet?
Ok.
 
If you care to share the ways you are thinking about I'd be happy to offer
my opinions from my perspective.

Thanks!
--Ed
 






More information about the Valentina mailing list