ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbp_5.4.0.1/rbaforzahfrch.htm

63 lines
3.5 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="Before you add referential constraints" />
<meta name="abstract" content="Before you can add referential constraints, you must make sure that you meet some conditions." />
<meta name="description" content="Before you can add referential constraints, you must make sure that you meet some conditions." />
<meta name="DC.Relation" scheme="URI" content="rbaforzahfrce.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="rbaforzahfrch" />
<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>Before you add referential constraints</title>
</head>
<body id="rbaforzahfrch"><a name="rbaforzahfrch"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Before you add referential constraints</h1>
<div><p>Before you can add referential constraints, you must
make sure that you meet some conditions.</p>
<div class="p"><ul><li>There must be a parent file with a key capable of being a parent key.
If the parent file has no primary key or unique constraint, the system tries
to add a primary key constraint to the parent file if the field attributes
of the potential parent key match those of the foreign key field attributes
of the dependent file.</li>
<li>There must be a dependent file with certain attributes that match the
attributes of the parent file: <ul><li>Sort sequence (SRTSEQ) must match for data types CHAR, OPEN, EITHER, and
HEX.</li>
<li>The coded character set identifier (CCSID) must match for each SRTSEQ
table unless either (or both) of the CCSIDs is 65535.</li>
<li>Each sort sequence table must match exactly.</li>
</ul>
</li>
<li>The dependent file must contain a foreign key that matches the following
attributes of the parent key: <ul><li>Data type</li>
<li>Length</li>
<li>Precision (packed, zoned, or binary)</li>
<li>CCSID (unless either has a CCSID of 65535)</li>
<li>REFSHIFT (if data type is OPEN, EITHER, or ONLY)</li>
</ul>
</li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbaforzahfrce.htm" title="You can add referential constraints on physical files with no more than one member. A referential constraint is a file-level attribute; therefore, you can create the constraint before the member exists.">Add referential constraints</a></div>
</div>
</div>
</body>
</html>