From the course: Relational Databases Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Data constraints

Data constraints

From the course: Relational Databases Essential Training

Start my 1-month free trial

Data constraints

- [Instructor] A relational database can protect the integrity and validity of your data in a number of ways. For the most part, this requires that you set specific rules on the data tables to control what will be allowed in. If someone tries to enter data that violates one of the rules, then the database management system won't allow the record to be saved into the table. The user will receive an error message and will have to try again with different values. In this way, you can be assured that every record that is saved into the database meets all of your requirements. One of the constraints that we can set on a table is that a column only allow unique values. In other words, each value in a specific column will only appear once. Now, you might be thinking that this sounds a lot like a primary key. And you'd be correct. A primary key is also a unique constraint placed on the data table. But where a primary key…

Contents