Integrity constraints

Integrity constraints

Integrity constraints are used to ensure accuracy and consistency of data in a relational database. Data integrity is handled in a relational database through the concept of referential integrity. There are many types of integrity constraints that play a role in referential integrity.

Codd, initially defined two sets of constraints, but in his second version of the relational model, he came up with five integrity constraints:
* Entity integrity
* Referential Integrity
* Domain IntegrityA 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.

* Column Integrity
* User Defined Integrity

Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Data integrity — in its broadest meaning refers to the trustworthiness of system resources over their entire life cycle. In more analytic terms, it is the representational faithfulness of information to the true state of the object that the information represents …   Wikipedia

  • Database integrity — ensures that data entered into the database is accurate, valid, and consistent. Any applicable integrity constraints and data validation rules must be satisfied before permitting a change to the database. Three basic types of database integrity… …   Wikipedia

  • Declarative Referential Integrity — (DRI) is one of the techniques in the SQL database programming language to ensure data integrity. Contents 1 Meaning in SQL 2 Product specific meaning 3 References 4 …   Wikipedia

  • Abductive logic programming — is a high level knowledge representation framework that can be used to solve problems declaratively based on abductive reasoning. It extends normal Logic Programming by allowing some predicates to be incompletely defined, declared as abducible… …   Wikipedia

  • Object-relational impedance mismatch — The object relational impedance mismatch is a set of conceptual and technical difficulties that are often encountered when a relational database management system (RDBMS) is being used by a program written in an object oriented programming… …   Wikipedia

  • computer science — computer scientist. the science that deals with the theory and methods of processing information in digital computers, the design of computer hardware and software, and the applications of computers. [1970 75] * * * Study of computers, their… …   Universalium

  • Check Constraint — A check constraint (also known as table check constraint) is a condition that defines valid data when adding or updating an entry in a table of a relational database. A check constraint is applied to each row in the table. The constraint must be… …   Wikipedia

  • Database schema — A depiction of MediaWiki database schema. A database schema (pronounced skee ma, /ˈski.mə/) of a database system is its structure described in a formal language supported by the database management system (DBMS) and refers to the organization of… …   Wikipedia

  • Codd's 12 rules — Codd s twelve rules are a set of thirteen rules (numbered zero to twelve) proposed by Edgar F. Codd, a pioneer of the relational model for databases, designed to define what is required from a database management system in order for it to be… …   Wikipedia

  • PostgreSQL — Developer(s) PostgreSQL Global Development Group Stable release 9.1.1[1] / 9.0.5 …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”