CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   MySQL (http://www.codingforums.com/forumdisplay.php?f=7)
-   -   Ensuring database integrity (http://www.codingforums.com/showthread.php?t=2989)

gorilla1 07-30-2002 04:19 PM

Ensuring database integrity
 
If I have a web page with a function that updates a database, what ensures that multiple users don't write to the database simultaneously and corrupt it? Does mySQL take care of this, or is there some lock command I must issue? I have been searching the doc, but I don't see anything.

G

Spookster 07-30-2002 07:37 PM

I believe you asked this question before and I believe I answered it already. Yes databases incorporate a mechanism similar to locking files to ensure that simultaneous requests to read/write take turns.

gorilla1 07-30-2002 07:57 PM

OK, thanks. I guess when I read your earlier answer I was unclear what you were saying - it sounded like you were saying that one had to take specific actions with a database just as with a flat file to ensure integrity. Now, I understand that the database does this itself. That would be one good reason to use them. Thanks.


G

Spookster 07-30-2002 08:10 PM

If you read up on the history of databases you will find that using organized file systems was one of the first concepts of a database. Files would be organized into directories then whatever program was written to handle searching, reading and writing had to deal with ensuring data integrity.


All times are GMT +1. The time now is 11:43 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.