ibm-information-center/dist/eclipse/plugins/i5OS.ic.sqlp_5.4.0.1/rbafymovnow.htm

76 lines
5.2 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Constraints" />
<meta name="abstract" content="DB2 UDB for iSeries supports unique, referential, and check constraints." />
<meta name="description" content="DB2 UDB for iSeries supports unique, referential, and check constraints." />
<meta name="DC.subject" content="constraint, data integrity, Edit Rebuild of Access Paths (EDTRBDAP) command, command (CL), Edit Rebuild of Access Paths (EDTRBDAP), EDTRBDAP (Edit Rebuild of Access Paths), check pending, data integrity, Edit Check Pending Constraints (EDTCPCST) command, Edit Check Pending Constraints (EDTCPCST), EDTCPCST (Edit Check Pending Constraints)" />
<meta name="keywords" content="constraint, data integrity, Edit Rebuild of Access Paths (EDTRBDAP) command, command (CL), Edit Rebuild of Access Paths (EDTRBDAP), EDTRBDAP (Edit Rebuild of Access Paths), check pending, data integrity, Edit Check Pending Constraints (EDTCPCST) command, Edit Check Pending Constraints (EDTCPCST), EDTCPCST (Edit Check Pending Constraints)" />
<meta name="DC.Relation" scheme="URI" content="rbafydataintex.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafycheckcon.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyconstex.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafymovnow" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Constraints</title>
</head>
<body id="rbafymovnow"><a name="rbafymovnow"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Constraints</h1>
<div><p><span class="keyword">DB2<sup>®</sup> UDB for iSeries™</span> supports
unique, referential, and check constraints.</p>
<div class="section"><p>A unique constraint is a rule that guarantees that the values
of a key are unique. A referential constraint is a rule that all non-null
values of foreign keys in a dependent table have a corresponding parent key
in a parent table. A check constraint is a rule that limits the values allowed
in a column or group of columns.</p>
</div>
<div class="section"><div class="p"><span class="keyword">DB2 UDB for iSeries</span> will enforce
the validity of the constraint during any DML (data manipulation language)
statement. Certain operations (such as restore of the dependent table), however,
cause the validity of the constraint to be unknown. In this case, DML statements
may be prevented until <span class="keyword">DB2 UDB for iSeries</span> has
verified the validity of the constraint. <ul><li>Unique constraints are implemented with indexes. If an index that implements
a unique constraint is invalid, the Edit Rebuild of Access Paths (EDTRBDAP)
command can be used to display any indexes that currently require rebuild.</li>
<li>If <span class="keyword">DB2 UDB for iSeries</span> does not currently
know whether a referential constraint or check constraint is valid, the constraint
is considered to be in a check pending state. The Edit Check Pending Constraints
(EDTCPCST) command can be used to display any indexes that currently require
rebuild.</li>
</ul>
</div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbafycheckcon.htm">Add and use check constraints</a></strong><br />
A <em>check constraint</em> assures the validity of data during insert
and update operations by limiting the allowable values in a column
or group of columns.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafydataintex.htm" title="Data integrity protects data from being destroyed or changed by unauthorized persons, system operation or hardware failures (such as physical damage to a disk), programming errors, interruptions before a job is completed (such as a power failure), or interference from running applications at the same time (such as serialization problems).">Data integrity</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rbafyconstex.htm" title="Constraints are rules enforced by the database manager.">Constraints</a></div>
</div>
</div>
</body>
</html>