A bit OT: handling multiple users in DB

Josh Mellicker josh at dvcreators.net
Mon Sep 22 13:16:58 EDT 2008


One way is to put a dateTimeLastModified column in every table, and  
make it a timestamp data type so it automatically gets updated when  
the record does.

Then, when you query data, make sure you get that value and save it  
locally.

Then, when the user goes to "Save", check the local and remote  
timestamps.

If <>, then warn the user, "Someone has recently updated this record."

After that, what happens depend on your application, either  
"Overwrite" or "Cancel", or perhaps "Merge data?" Or perhaps you show  
both records side by side and the user can decide?


On Sep 22, 2008, at 2:46 AM, Klaus Major wrote:

> Hi all,
>
> this is a bit off topic, but maybe someone can give me some helpful  
> hints.
>
> Is someone of you working with databases with multiple users?
> If yes, how do you handle "concurrent transactions"?
>
> I mean how do you solve the possible overwriting of data when both  
> users work with
> cursors and are allowed to  update data and how do you update a  
> cursor (on the fly?)
> when its data may have been updated?
>
> Know what I mean?
>
> I searched the net and found some hints, but maybe you have some  
> really clever
> solutions that you are willing to share :-)
>
> Thanks in advance!
>
>
> Best
>
> Klaus Major
> klaus at major-k.de
> http://www.major-k.de
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list