Database Reference
In-Depth Information
restrictions are imposed on the data values in a database. The purpose is to regu-
late and ensure that the data content is valid and consistent. For example, to pre-
serve the uniqueness of each tuple in a relation, the constraint or rule is that the
primary key has unique values in the relation. Another example is a domain con-
straint that requires that all values of a specific attribute be taken from the same
set or domain of permissible values.
As mentioned above, a relational data model consists of tables or relations that
conform to relational rules and possess specific properties. We will now discuss the
constraints and properties that ensure data correctness and consistency in a rela-
tional data model. First, let us establish the reasons for ensuring data integrity. A
database is said to possess data integrity if the data values provide a correct and
valid representation of the characteristics of the entities or objects. Data integrity
includes consistency of data values. Data values derived from one business process
must match up correctly with the same values derived from another process.
Why Data Integrity?
Let us summarize the reasons for data integrity and examine how the relational data
model must ensure data integrity.
Each tuple must represent one specific entity. There must be no ambiguity in
identification of the tuple for each specific entity.
The values in all tuples for any single attribute must be of the same data type,
format, and length. There must not be variations, confusion, or unpredictabil-
ity in the values for every attribute.
The columns must be identified only by names and not by position or physical
order in a relation.
A new row may be added anywhere in the table so that the content does not
vary with the order of the rows or tuples in a relation.
The model should express relationships correctly and without any room for
exceptions.
The data model must consist of well-structured relations with minimum data
redundancy.
Data manipulations in a relational database must not result in any data
inconsistencies.
First, we will consider the basic relational properties that support data integrity
and data consistency. Next, we will address three special cases that further enhance
data integrity.
Basic Relational Properties
Here is a list of the significant relational properties that govern the relations in a
relational model:
Row uniqueness. Each row or tuple is unique—no duplicate rows with the same
set of values for the attributes are allowed. No two rows are completely identical.
Search WWH ::




Custom Search