April 2016
Beginner to intermediate
300 pages
6h 58m
English
Constraints allow us to use underlying relational database features to help us maintain database integrity. For example, let’s validate our categories. When we create a video, we need to make sure that our category exists. We might be tempted to solve this problem by simply performing a query, but such an approach would be unsafe due to race conditions. In most cases, we would expect it to work like this:
However, someone could delete the category between steps 2 and 3, allowing us to ultimately insert a video without ...