Summary
Today we talked about creating and managing constraints in a relational database. A constraint is an object created in the database that places rules on data stored in columns, and enforces these rules to protect your data. For example, if you try to insert data into a table column and the data does not follow the rules specified by the constraint, the database will not allow the violating data to be stored in the column.
We also talked about several different types of constraints. One was the primary key, which is a combination of one or more columns that make every row of data in a table unique. The unique constraint also ensures uniqueness of data in a table just like the primary key constraint. You can only have one primary key constraint ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access