A bit OT: handling multiple users in DB

Klaus Major klaus at major-k.de
Mon Sep 22 10:21:14 EDT 2008


Hi Stephen,

looks like my questions were not clear enough!

> MySQL will do what you want.

Not really ;-)

> It's a black box to store an manupulate data.
> Most of the time the transactions are so fast, it doesn't matter.

Not really, see below ;-)

Scenario:
2 users (A and B) are browsing through data in a (local) db cursor.
These data are already old/not up to date once they appear on the  
target machine,
since another user (C) may have updated/deleted or altered the data a  
millisecond
after users A and B receive their data/cursor.

Now when both users decide to change (update) data, who hits the  
"update"
button first is the loser, since the data of the other user will  
overwrite his data!

Not to mention the fact that the (local) cursor of one user does not  
reflect the changes
that the other user already made etc. Know what I mean?

Therefore one needs to implement a nifty solution to avoid exactly  
this situation.

> In the case of mySQL, it's  multi user by design and if one is  
> really worried about it, there's COMMIT and ROLLBACK.
>
> SQL Lite is not multi-user.
> -- 
>
> stephen barncard
> s a n  f r a n c i s c o

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de





More information about the use-livecode mailing list