Hierarchical Data Storage

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Feb 12 02:11:49 CST 2007


On 11/2/07 10:09 PM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:

Hi Bart,

>>> http://www.sitepoint.com/article/hierarchical-data-database/2

>> I have read this article completely. Its new idea for me to use 2
>> integer
>> columns to improve things!
>> 
>> At morning I have next thoughts:
>> 
>> * we have BinaryLink - okay.
>> 
>> * we can introduce its sub-class
>>           HierarchyBinaryLink
>> 
>> * so developer make table T1 with only ONE field (following example of
>> article)
>> 
>>         T1 ( productName, and of course more fields can be, ... )
>> 
>> And now establish self-recursive HierarchyBinaryLink
>> 
>>     CREATE HIERARCHY BINARY LINK link_name (T1)
>>         USING { LIST | PREORDER }
> 
> What List would that be  in the USING clause ?

Article describes TWO ways. Right?
So USING can allow develop choose WHAT implementation to choose.

>> So this class HierarchyBinaryLink will implement both ways.
>> Will contains algorithms and data outside of T1.
>> 
>>     It seems to me just COOL.  :-)
>> 
> 
> Do you mean that this Hierarchy binary link will "automagically"
> implement the left and right values for each  node ?

Yes. That's the point.

Then Valentina developers will have this technique ready for use, and with
best performance. 

While reading this article, I also have think about:
    if its possible to use integer values with some STEP > 1
    then may be Add of node will be faster.
    or use double values instead of integers...


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