Author: Shameer
•10:31 AM
Definition:
A constraint is a property assigned to a column or the set of columns in a table that prevents certain types of inconsistent data values from being placed in the column(s). Constraints are used to enforce the data integrity. This ensures the accuracy and reliability of the data in the database.

Categories of Data Integrity
The following are the categories of the data integrity:

Entity Integrity
This rule states that every table must have a Primary Key and the column chosen to be primary key should be unique and not null. It ensures that there are no duplicate rows in a table.

Domain Integrity
It restricts the date to predefined data type, the format, or the range of possible values.

Referential integrity
Ensures that rows cannot be deleted, which are used by other records (for example, corresponding data values between tables will be vital). i.e. any field in a table that is declared as foreign key can contain only values from a parent table’s primary key

User-Defined Integrity
Enforces some specific business rules that do not fall into entity, domain, or referential integrity categories.
This entry was posted on 10:31 AM and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

1 comments:

On November 9, 2010 at 3:07 AM , Anonymous said...

hi