Hierarchical Data Storage
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Feb 13 03:30:06 CST 2007
On 13/2/07 12:24 AM, "Bart Pietercil" <bart.pietercil at gmail.com> wrote:
Bart,
Actually Trevor points that IF exists several ROOTs than this algorithm
simply may not work.
Because you already cannot use
UPDATE WHERE left > 1 and RIGHT < 32
Because this UPDATE also will touch nodes of OTHER trees.
Right Trevor?
Hmm.
> Yes, you are right
>
> The only moment where you can update the tree is when you can obtain
> an exclusive read-write lock on the cursor "WHERE right >
> my_current_right".
> So this code would need to be placed in a Try Catch block.
>
> Maybe hard (depending on how you implement reading the tree), but
> certainly feasable (I think).
>
> My solution requires a lot less updating of tree values, so I admit
> that you need to be worried a lot more (lucky me)
>
> Bart
>
> On 12-feb-07, at 22:41, Trevor DeVore wrote:
>
>> On Feb 12, 2007, at 12:54 PM, Bart Pietercil wrote:
>>
>>> Hi Trevor,
>>>
>>> why wouldn't you organise it as Tree "lessons" ---> Node 1 Lesson
>>> 1, Node 2 Lesson 1.1 Node 3 Lesson 2 and so one ?
>>>
>>> The Tree traversal method allows an unlimited number of Levels?
>>>
>>> Maybe I'm missing something (wouldn't be the first time)
>>
>> Hi Bart,
>>
>> In this particular db design lessons cannot have a parent lesson.
>> Lessons are grouped into curriculums (which has a table of it's own
>> as well). So a lesson tree is just a single lesson and it's steps
>> which is the combination of the lessons and steps table.
>>
>> I think in either case you are left with the same problem though.
>> As I understand it, if you are going to have multiple people
>> working on the database than how do you keep updates in on portion
>> of the tree from affecting everything to the "right" of the current
>> node? It seems if you do change the left/right values for every
>> record to the right of a node that any records other db editors
>> might have open would be invalidated and have to be reloaded.
>>
--
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