Updating Data and Transactions
暂无分享,去创建一个
Now that data has been inserted into our database, and we have seen how to retrieve this information, it is now time to look at how to modify, or update the data. Ensuring that you update the right data at the right time is crucial to maintaining data integrity. You will find that when updating data, and also when removing or inserting data, it is best to group this work as a single, logical unit, called a transaction, thereby ensuring that if an error does occur, it is still possible to return the data back to its original state. This chapter features how a transaction works and how to incorporate this within your code.