mysteriousmonkey29 0 Posted August 23, 2016 Report 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 Quote Link to post Share on other sites
Ingolme 1,019 Posted August 23, 2016 Report Share Posted August 23, 2016 MySQL is prepared to handle many connections at the same time. Quote Link to post Share on other sites
justsomeguy 1,135 Posted August 23, 2016 Report 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. Quote Link to post Share on other sites
mysteriousmonkey29 0 Posted August 24, 2016 Author Report Share Posted August 24, 2016 Great, thanks Quote Link to post Share on other sites
justsomeguy 1,135 Posted August 24, 2016 Report 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.