Reading and writing, part 2: files and databases
Published: 5 October 2020
Tags: rust, ruby
Working with databases can be tricky business. When it comes to SQL, you'll often have to use transactions for complicated queries, because they might consist of multiple queries, business logic, and then updates or inserts, which require all the data for that transaction to be unchanged (ie not have some other update query change the value of something before the transaction is finished). In this extensive article, James Coglan demonstrates how reading and writing to a database record can be handled to reduce these kinds of issues, and some solutions for allowing limited database access when data is being worked on.
|