Constraint
Meaning in software engineering, with examples
In software engineering, constraint means: A rule set on a table or column that the database enforces automatically, rejecting any data that would break it.
In Turkish: kısıt, kısıtlama
How it is used
The main kinds are PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK and DEFAULT (some books do not count DEFAULT as a real constraint). Data that breaks one causes a 'constraint violation' error. You add, drop, name and sometimes temporarily disable constraints during large data loads.
Example sentences
A CHECK constraint makes sure the discount is between 0 and 100.
Give every constraint a clear name so error messages are easy to understand.
Common collocations
- add a constraint
- constraint violation
- CHECK constraint
- drop a constraint
- enforce a constraint
Related terms
This word in other fields
The same English word can have a different meaning in another field:
More terms: Databases and Persistence
Practise with graded reading
Reading at the right level is the fastest way to make new words stick. Pick free English books by level:
