Database Reference
In-Depth Information
An integrity constraint that determines the range of possible values for a domain.field spe-
cification represents all the elements of a field. This type of data integrity warrants the fol-
lowing: 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 opera-
tions that can be applied to the values in the field are clearly identified. Each field specific-
ation incorporates three types of elements: general, physical, and logical.
General elements constitute the most fundamental information about the field and include
items such as Field Name, Description, and Parent Table.
 Physical elements determine how a field is built and how it is represented to the person
using it. This category includes items such as Data Type, Length, and Display Format.
 Logical elements describe the values stored in a field and include items such as Required
Value, Range of Values, and Default Value.
4.12 ENTITY INTEGRITY
Definition
No prime attribute of a relation may hold a null value
Entity constraints ensure the integrity of the entities being modeled by the system. Entity
integrity is an integrity rule which states that every table must have a primary key and that
the column or columns chosen to be the primary key should be unique and not null. If each
value of a primary key must be distinct, no duplicate rows can logically appear in a table.
Example 8:
Let Account (AccountNo, Name, Type of Account, Amount) with a primary key Ac-
countNo be a relation in a bank database. Following figure shows its possible instance.
Search WWH ::




Custom Search