A constraint is a restriction on what records in a Table are visible to a program component (e.g. a view, a web object, a report). There are two reasons that you might want to constrain records in a DDO:
When one DDO relates to another, you may want the child DDO to only show the records that relate to the current record in the related-to parent DDO. This is called a relates-to constraint.
A view or report may only be concerned with a subset of records at any one time. You could specify customers and a given region and/or tax bracket. These are called Filter constraints.
The Constraint Building Process
Inheritance of Constraints
Constraint Search Optimization