What is a constraint?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is a constraint?
Rating:
A constraint enforces the integrity of a database. It defines rules regarding the values allowed in the columns of a table. A constraint is the standard mechanism for enforcing integrity. Using constraints is preferred to using triggers, rules, and defaults. Most of the RDBMS databases support the following five types of constraints:
- NOT NULL constraint: It specifies that the column does not accept NULL values.
- CHECK constraint: It enforces domain integrity by limiting the values that can be placed in a column.
- UNIQUE constraint: It enforces the uniqueness of values in a set of columns.
- PRIMARY KEY constraint: It identifies the column or set of columns whose values uniquely identify a row in a table.
- FOREIGN KEY constraint: It establishes a foreign key relationship between the columns of the same table or different tables.
Rating:
Was this information helpful?
Other articles
- What is a page split?
- What is the ToString method?
- What is Oracle's password history feature?
- What is the ShowAlways property?
- Things to practice for Microsoft test 70-228.
