64 lines
4.3 KiB
HTML
64 lines
4.3 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="concept" />
|
|
<meta name="DC.Title" content="Enforcement of delete rules" />
|
|
<meta name="abstract" content="When you delete a record from a parent file, the system checks the dependent file for any dependent records (matching non-null foreign key values). If the system finds any dependent records, the delete rule determines the action that is taken." />
|
|
<meta name="description" content="When you delete a record from a parent file, the system checks the dependent file for any dependent records (matching non-null foreign key values). If the system finds any dependent records, the delete rule determines the action that is taken." />
|
|
<meta name="DC.Relation" scheme="URI" content="rbaforzahfrcr.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="rbaforzahfrcs" />
|
|
<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>Enforcement of delete rules</title>
|
|
</head>
|
|
<body id="rbaforzahfrcs"><a name="rbaforzahfrcs"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Enforcement of delete rules</h1>
|
|
<div><p>When you delete a record from a parent file, the system checks
|
|
the dependent file for any dependent records (matching non-null foreign key
|
|
values). If the system finds any dependent records, the delete rule determines
|
|
the action that is taken.</p>
|
|
<div class="p"><ul><li><strong>No Action</strong>. If the system finds any dependent records, it returns
|
|
a constraint violation and does not delete records.</li>
|
|
<li><strong>Cascade</strong>. The system deletes dependent records that its finds in
|
|
the dependent file.</li>
|
|
<li><strong>Set Null</strong>. The system sets null-capable fields in the
|
|
foreign key to null in every dependent record that it finds.</li>
|
|
<li><strong>Set Default</strong>. The system sets all fields of the foreign key to their
|
|
default value when it deletes the matching parent key.</li>
|
|
<li><strong>Restrict</strong>. Same as no action except that enforcement is immediate.</li>
|
|
</ul>
|
|
</div>
|
|
<p>If part of the delete rule enforcement fails, the entire delete operation
|
|
fails and all associated changes are rolled back. For example, a delete cascade
|
|
rule causes the database to delete ten dependent records, but a system failure
|
|
occurs while deleting the last record. The database will not allow deletion
|
|
of the parent key record, and the deleted dependent records are re-inserted.</p>
|
|
<p>If a referential constraint enforcement causes a change to a record, the
|
|
associated journal entry will have an indicator value noting that a referential
|
|
constraint caused the record change. For example, a dependent record that
|
|
is deleted by a delete cascade rule will have a journal entry indicator which
|
|
indicates that the record change was generated during referential constraint
|
|
enforcement. </p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbaforzahfrcr.htm" title="The rules that you specify for the referential constraint determine how the database processes the delete and update operations on the parent key. The system enforces the unique attribute of a parent key on all parent file I/O.">Parent key enforcement</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |