concurrent updates
From: VisionSet (spam_at_ntlworld.com)
Date: 12/15/03
- Next message: Jeff Smith: "Re: PL*SQL stored procedure, oracle objects and Java"
- Previous message: Robert Klemme: "Re: Storing strings in XMLTYPE columns"
- Next in thread: Marvin: "Re: concurrent updates"
- Reply: Marvin: "Re: concurrent updates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Jeff Smith: "Re: PL*SQL stored procedure, oracle objects and Java"
- Previous message: Robert Klemme: "Re: Storing strings in XMLTYPE columns"
- Next in thread: Marvin: "Re: concurrent updates"
- Reply: Marvin: "Re: concurrent updates"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|