Browse Prior Art Database

Referential Integrity Implementation Details and Advantages

IP.com Disclosure Number: IPCOM000115163D
Original Publication Date: 1995-Mar-01
Included in the Prior Art Database: 2005-Mar-30

Publishing Venue

IBM

Related People

Anderson, MJ: AUTHOR [+14]

Abstract

A method for providing referential integrity within a database system that provides both superior functionality and ease-of-use is disclosed. This solution also allows for easy referential constraint management without drastically impacting system storage requirements as other methods have done. In addition, this method is also standards compatible with another key database feature, triggers, and can be applied to distributed database systems as well.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 20% of the total text.

Referential Integrity Implementation Details and Advantages

      A method for providing referential integrity within a database
system that provides both superior functionality and ease-of-use is
disclosed.  This solution also allows for easy referential constraint
management without drastically impacting system storage requirements
as other methods have done.  In addition, this method is also
standards compatible with another key database feature, triggers, and
can be applied to distributed database systems as well.

      An important function within any relational data base system is
that of referential integrity.  Referential Integrity (RI) ensures
data consistency between related columns of two different tables or
the same table.  The defined and enforced  relationship between these
related columns is known  as a referential constraint.   A
referential constraint is an assertion that non-null values of a
"foreign key" are valid only if they also appear as values of the
"primary" key in the related table.  To guarantee a data base's
referential integrity, the data base system must ensure that non-null
foreign key values have a matching primary key value.  Although the
concept of referential integrity is not new, the RI design disclosed
here is unique and advantageous in many aspects.  Disclosed are four
methods for referential integrity.
  1.  Constraint Management - Ease of use in managing table
constraints
       with missing pieces: The user can have tables with partial
       constraints.  To define a constraint relationship, the parent
       table and dependent table must both exist.  The system allows
the
       user to define a constraint relationship even when the object
       (a file member in DB2/400*) that contains the data does not
yet
       exist.
        The mechanism to support this is the system cross reference
       file.  When a constraint is defined, an entry for the
constraint
       will be registered in the cross reference file.  Once the
parent
       and dependent table are associated with data objects
(members), a
       dependent access path (index) will be created for the
constraint
       definition, the constraint will be registered in the cross
       reference file, and the constraint will be placed in the
       established state.
        Other systems also use indexes for RI constraint
       definitions.  However, most of those systems always create
their
       "own" index for constraint enforcement.  This method has the
       database first look and see if the table has an existing index
       that can be shared for constraint enforcement before creating
an
       index.
        This provides the end user with a couple of advantages.
       First, additional storage (DASD) for a separate index is not
       wasted by the database...