Subject Re: [firebird-support] two/more "non-conflicting" updates?
Author unordained
The granularity of information may be at the field level, but the granularity of changes is
generally limited to the row level. It is assumed that if you say something, in sentence form, all
the parts of that sentence go together. Changing one necessarily affects the meaning of the whole.

I'm assuming you can get around this by splitting up your tables according to "working groups". If
some statements are independent of others, such as "Gary works in Accounting" and "Gary wears a tie
to work" then you can make those separate. Updating one has no effect on the other. The only
problem I could see coming is FB's locking mechanism when it comes to FK constraints. If one table
were to point at the other, then updating a row in one table could prevent a related row in another
table from being updated. I believe this would be circumvented by letting all of the split-up
propositions point back to a single PK table.

To re-use my example above:

People (name, dept_name, wears_tie)

... becomes ...

People (name) [name is PK]
Works_in_dept (name, dept_name) [name is PK and is a FK to]
Wears_tie (name, current_status) [name is PK and is a FK to]

Updating "dept_name" would only require that no updates be pending on the People table for "Gary".
Updates to the two dependent tables can therefore be made simultaneously.


---------- Original Message -----------
From: David Garamond <lists@...>
Sent: Sun, 04 Jan 2004 18:32:20 +0700
Subject: [firebird-support] two/more "non-conflicting" updates?

> Currently, in FB, when a client (client #1) updates a row (and still
> hasn't finished his transaction), then client #2 which tries to update
> the same row will be rejected by FB.
> Suppose the update by client #1 is increasing the value of a numeric
> field by 1 (e.g. 5 becomes 6). And the client #2's udpdate is of the
> same operation. In other words, the two updates are non-conflicting.
> Both can be applied at whatever order and the effects are the same (I
> think the mathematical term is 'commutative'?)
> Is there some way that I can convince/make FB allow those two updates?
> The goal is not to have client #2's update operation be rejected with a
> conflict error.
> Or is there any known database that can do something 'smart' like this?
> --
> dave
> Yahoo! Groups Links
> To visit your group on the web, go to:
> To unsubscribe from this group, send an email to:
> Your use of Yahoo! Groups is subject to:
------- End of Original Message -------