mysteriousmonkey29 Posted August 23, 2016 Share Posted August 23, 2016 Hello, I am creating a web comic aggregation website. I am currently working on the back end in PHP, which uses an RSS reader to update a MySQL database every so often. Than I want the front end to access this database every time a user accesses the website. However, it seems like this will inevitably cause simultaneous reading from and writing to the database, from the front and back ends, respectively. Is this going to cause problems down the line? Or can MySQL handle this without glitching? Thanks in advance Link to comment Share on other sites More sharing options...
Ingolme Posted August 23, 2016 Share Posted August 23, 2016 MySQL is prepared to handle many connections at the same time. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 23, 2016 Share Posted August 23, 2016 MySQL will lock records that are being read or written until the operation is finished. The data will be consistent. Different storage engines use different locking models, for example MyISAM locks an entire table while InnoDB locks only the necessary rows. Link to comment Share on other sites More sharing options...
mysteriousmonkey29 Posted August 24, 2016 Author Share Posted August 24, 2016 Great, thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted August 24, 2016 Share Posted August 24, 2016 I should say that the data will be consistent as long as you use transactions. Without transactions race conditions are still possible if all of the stars align. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now