Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: [X] Tree/Graph structure in many-to-many relationship, avoiding/detecting circularity
In article <3c7fc988$0$18443$ba624c82_at_nntp02.dk.telia.net>, "Peter
Laursen" <pl_at_mail1.remove.this.stofanet.dk> wrote:
> Bot now to the difficult part (and the database part). How to make this
> work in a multitreaded environment with many users selecting and
> inserting data? If you allow many users do the test at the same time,
> each could assert that their insert would do no harm and go ahead and
> insert and commit, not seeing conflicting rows because they already
> searched that branch. I see no easy solution short of a table lock. I
> would love to know an elegant and efficient solution! If you want to try
> the trigger read this first
> http://osi.oracle.com/~tkyte/Mutate/index.html
I think I know of a way to manage the locks without grabbing the whole table. If you look in Garcia-Molina, Ullman, and Widom's _Database_System_Implementation, Section 9.7 covers tree locking. I think this will work for a DAG as well, but I don't have time to explore it at this moment.
It also depends on the particulars of your transactions, eg inserting multiple links at a time vs. one-at-a-time. Received on Fri Mar 01 2002 - 13:31:02 CST
![]() |
![]() |