Declarative Referential Integrity

Declarative Referential Integrity

Declarative Referential Integrity (DRI) is one of the techniques in the SQL database programming language to ensure data integrity.

Contents

Meaning in SQL

A table (called the child table) can refer to a column (or a group of columns) in another table (the parent table) by using a foreign key. The referenced column(s) in the parent table must be under a unique constraint, such as a primary key. Also, self-references are possible (not fully implemented in MS SQL Server though[1]). On inserting a new row into the child table, the relational database management system (RDBMS) checks if the entered key value exists in the parent table. If not, no insert is possible. It is also possible to specify DRI actions on UPDATE and DELETE, such as CASCADE (forwards a change/delete in the parent table to the child tables), NO ACTION (if the specific row is referenced, changing the key is not allowed) or SET NULL / SET DEFAULT (a changed/deleted key in the parent table results in setting the child values to NULL or to the DEFAULT value if one is specified).

Product specific meaning

In Microsoft SQL Server the term DRI also applies to the assigning of permissions to users on a database object. Giving DRI permission to a database user allows them to add foreign key constraints on a table.[2]


References

  1. ^ Microsoft Support (2007-02-11). "Error message 1785 occurs when you create a FOREIGN KEY constraint that may cause multiple cascade paths". microsoft.com. http://support.microsoft.com/kb/321843/en-us. Retrieved 2009-01-24. 
  2. ^ Chigrik, Alexander (2003-08-13). "Managing Users Permissions on SQL Server". Database Journal. http://www.databasejournal.com/features/mssql/article.php/2246271. Retrieved 2006-12-17. 

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • InnoDB — Infobox Software name = InnoDB logo = caption = developer = Oracle Corporation latest release version = latest release date = operating system = Cross platform genre = Database engine license = GPL or proprietary website = [http://www.innodb.com/ …   Wikipedia

  • Oracle Corporation — Type Public Traded as NYSE: ORCL NASDAQ:  …   Wikipedia

  • DRI — or D.R.I. may stand for: Contents 1 Business 2 Government 3 Other organizations 4 Healthcare and bioscience 5 …   Wikipedia

  • DRI — Dietary Reference Intakes (Miscellaneous » Food) **** Development of Regional Impact (Governmental » United Nations) **** Darden Restaurants, Inc. (Business » NYSE Symbols) **** Direct Rendering Infrastructure (Computing » General) *** Dietary… …   Abbreviations dictionary

  • 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

  • Data Definition Language — A data definition language or data description language (DDL) is a syntax similar to a computer programming language for defining data structures, especially database schemas. Contents 1 History 2 SQL 2.1 CREATE statements …   Wikipedia

  • SQL — This article is about the database language. For the airport with IATA code SQL, see San Carlos Airport. SQL Paradigm(s) Multi paradigm Appeared in 1974 Designed by Donald D. Chamberlin Raymond F. Boyce Developer …   Wikipedia

  • Relational database — A visual diagram showing the relationship between the two tables, as indicated by the arrow A relational database matches data by using common characteristics found within the data set. The resulting groups of data uses the relational model (a… …   Wikipedia

  • Data validation — In computer science, data validation is the process of ensuring that a program operates on clean, correct and useful data. It uses routines, often called validation rules or check routines , that check for correctness, meaningfulness, and… …   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

Share the article and excerpts

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