concurrent updates

From: VisionSet (spam_at_ntlworld.com)
Date: 12/15/03


Date: Mon, 15 Dec 2003 12:29:43 -0000

I have a RDB table where many rows are for 1 employee.
The application reads the rows for a certain employee.
The rows are mapped to Objects and these objects are modified by the
application.
The objects are then persisted to the database.

However, this is a distributed application and those records need to be read
by and updated by other users. And locking the whole table for read & write
seems a little draconian!

Here is what I propose.
The application reads the rows for a certain employee.
The rows are mapped to Objects
A copy of these objects is made.
User thinks, time passes
One set is modified by the application.
When the user wants to commit the changes:
the table is locked,
the rows are re-read and mapped to objects.
The collection of objects are compared with the unmodified copy made
previously
if they are equal the modified objects overwrite the existing ones.
If they are not equal checks are run to see if it affects the proposed
update, if it does the user is informed for ammendments.
table is unlocked.

I'm new to concurrent updates, it all seems a bit of a nightmare!

Does this seem okay? any tips?

-- 
Mike W


Relevant Pages

  • Re: Database type independence
    ... than an RDB. ... RDBs are wonderful tools for a wide range of applications. ... simply store a file whose name is the id of the employee. ... >relational database. ...
    (comp.object)
  • Re: Database type independence
    ... > simply store a file whose name is the id of the employee. ... > data into an RDB. ... > nothing to do with my reasons for not wanting it. ...
    (comp.object)
  • Re: new training database
    ... Please re-read my response. ... employee and THAT course), plus any info specific to that pair. ... <Access MVP> ...
    (microsoft.public.access.gettingstarted)
  • Re: Object identity
    ... RDB" you will see it. ... to the object instance: two object instances have different indentity even ... Employee* a = new Employee; ... the object is the same in the computing space because one cannot map real ...
    (comp.object)