Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
more useful options
 
PerlMonks  

Re: Locking database

by arturo (Vicar)
on Feb 14, 2001 at 01:09 UTC ( #58235=note: print w/ replies, xml ) Need Help??


in reply to Locking database

One locks a file so that no more than one process will be attempting to alter that file at the same time. Fundamentally, it has nothing to do with users, but processes (think of two people trying to write to the same line on the same piece of paper at the same time ... that's like two processes contending to write to the same file at the same time).

So, if you have a script, say, foo.cgi, that updates a database (say, based on user input), you want only one INSTANCE of foo.cgi to be writing to the DB file at any one time, in order to make sure that the DB doesn't get messed up.

Philosophy can be made out of anything. Or less -- Jerry A. Fodor


Comment on Re: Locking database
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://58235]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2013-05-22 20:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (470 votes), past polls