- database solutions and downloads for microsoft access

Relational Database Design

Domain Level Integrity

A domain defines the possible values of an attribute. Domain Integrity rules govern these values. In a database system, the domain integrity is defined by:

  • The datatype and the length
  • The NULL value acceptance
  • The allowable values, through techniques like constraints or rules
  • The default value

For example, if you define the attribute of Age, of an Employee entity, is an integer, the value of every instance of that attribute must always be numeric and an integer.

If you also define that this attribute must always be positive, the a negative value is forbidden.

The value of this attribute being mandatory indicates that the attribute can be NULL.

All of these characteristics form the domain integrity of this attribute.

This type of data integrity warrants the following: the identity and purpose of a field is clear and all of the tables in which it appears are properly identified; field definitions are consistent throughout the database; the values of a field are consistent and valid; and the types of modifications, comparisons and operators that can be applied to the values in the field are clearly identified.

Each attribute in the model should be assigned domain information which includes:

  • Data Type - Basic data types are integer, decimal, or character. Most data bases support variants of these plus special data types for date and time.
  • Length - This is the number of digits or characters in the value. For example, a value of 5 digits or 40 characters.
  • Date Format - The format for date values such as dd/mm/yy or mm/dd/yyyy or yy/mm/dd.
  • Range - The range specifies the lower and upper boundaries of the values the attribute may legally have.
  • Constraints - Are special restrictions on allowable values. For example, the LeavingDate for an Employee must always be greater than the HireDate for that Employee.
  • Null support - Indicates whether the attribute can have null values.
  • Default value (if any) - The value an attribute instance will have if a value is not entered.