Hierarchical Data Storage

Bart Pietercil bart.pietercil at gmail.com
Mon Feb 12 16:24:57 CST 2007


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.
>
>
> -- 
> Trevor DeVore
> Blue Mango Learning Systems - www.bluemangolearning.com
> trevor at bluemangolearning.com
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list