Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-30-2002, 04:19 PM   PM User | #1
gorilla1
Regular Coder

 
Join Date: Jun 2002
Posts: 544
Thanks: 0
Thanked 0 Times in 0 Posts
gorilla1 is an unknown quantity at this point
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
gorilla1 is offline   Reply With Quote
Old 07-30-2002, 07:37 PM   PM User | #2
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 07-30-2002, 07:57 PM   PM User | #3
gorilla1
Regular Coder

 
Join Date: Jun 2002
Posts: 544
Thanks: 0
Thanked 0 Times in 0 Posts
gorilla1 is an unknown quantity at this point
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
gorilla1 is offline   Reply With Quote
Old 07-30-2002, 08:10 PM   PM User | #4
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,220
Thanks: 4
Thanked 80 Times in 79 Posts
Spookster will become famous soon enough
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:57 PM.


Advertisement
Log in to turn off these ads.