Constraints give control over the data in your tables. If a user attempts to store data in a column that would violate a constraint, an error is raised. This applies even if the value came from the default value definition.
There are several types of constraints: check constraint, not null constraint, unique constraint, primary key constraint and foreign key constraint.
Please refer to References and Foreign Keys for information about a foreign key constraint.