From the course: Learning Relational Databases

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Apply integrity constraints

Apply integrity constraints

- One of the most important things about having your data stored in a database is being able to trust that the data has been entered correctly. The database management system can protect you in a number of ways from getting invalidated into the database in the first place through a series of rules called "integrity constraints". Sometimes integrity constraints are implemented through a new related data table. For instance, when storing a two letter state abbreviation you might refer to a separate state lookup table to ensure that the entered value appears in the table of valid state abbreviations. Lookup tables will include all of the valid choices for a particular piece of data. A second approach to the same problem is to create what's called "a check constraint", or in Microsoft Access it's known as a validation rule. Here we can build the constraint right into the design of the table itself without needing any…

Contents