Introduction to Constraints, Assertions, and Triggers

Naja Møgeltoft
Jun 7 · 9 min read

When you create a database, it usually with a few core goals in mind: to store data in an easy manner, and to be able to easily access or manipulate it. For the latter, this could for example be to insert new data into the database or delete useless and outdated data. However, one of the challenges that arise when we want to modify our database — that we may violate the integrity constraints of the database. To avoid violating these constraints, it is possible to use multiple methods. In this article, we will discuss the methods called ‘constraints’, ‘assertions’…