Enforcing data integrity ensures the quality of the data in the system, and contributes to have bug free applications. Two important steps in checking the data integrity are to identify valid values for a type and to decide how to enforce its data integrity.
Data integrity is very known by database designers, and it falls into these categories:
- Entity integrity
- Domain integrity
- Referential integrity
- User-defined integrity
This Post gives some interseting ways to enforce the domain integrity.