ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaik_5.4.0.1/normalization.htm

78 lines
5.1 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="Normalization" />
<meta name="abstract" content="Several available design methods allow you to design technically correct databases, and effective relational database structure. Some of these methods are based on a design approach called normalization. Normalization refers to the reduction or elimination of storing redundant data." />
<meta name="description" content="Several available design methods allow you to design technically correct databases, and effective relational database structure. Some of these methods are based on a design approach called normalization. Normalization refers to the reduction or elimination of storing redundant data." />
<meta name="DC.Relation" scheme="URI" content="rzaikdbdesign.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="normalization" />
<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>Normalization</title>
</head>
<body id="normalization"><a name="normalization"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Normalization</h1>
<div><p>Several available design methods allow you to design technically
correct databases, and effective relational database structure. Some of these
methods are based on a design approach called normalization. Normalization
refers to the reduction or elimination of storing redundant data.</p>
<div class="section"><p> The primary objective of normalization is to avoid problems that
are associated with updating redundant data.</p>
</div>
<div class="section"><p>However, this design approach of normalization (for example, 3NF3rd
Normal Form), may result in large numbers of tables. If there are numerous
table join operations, SQL performance may be reduced. Consider overall SQL
performance when you design databases. Balance<sup>®</sup> the amount of redundant data
with the number of tables that are not fully normalized.</p>
</div>
<div class="section"><p>The following graphic illustrates that the proportion of redundant
data to the number of tables affects performance:</p>
</div>
<div class="section"><br /><img src="perf02.gif" alt="Balancing redundant data and number of tables" /><br /></div>
<div class="section"><p>Minimize the use of code tables when little is gained from their
use. For example, an employee table contains a JOBCODE column, with data values
054, 057, and so forth. This table must be joined with another table to translate
the codes to Programmer, Engineer, and so on. The cost of this join could
be quite high compared to the savings in storage and potential update errors
resulting from redundant data.</p>
<p>For example:</p>
</div>
<div class="section"><div class="fignone"><span class="figcap">Figure 1. Normalized data form:</span><br /><img src="perf03.gif" alt="Normalized data form" /><br /></div>
<div class="fignone"><span class="figcap">Figure 2. Redundant data form:</span><br /><img src="perf04.gif" alt="Redundant data form" /><br /></div>
</div>
<div class="section"><p>The set level (or mass operation) nature of <span class="keyword">SQL</span> significantly
lessens the danger of a certain redundant data form. For example, the ability
to update a set of rows with a single <span class="keyword">SQL</span> statement
greatly reduces this risk. In the following example, the job title <strong>Engineer</strong> must
be changed to <strong>Technician</strong> for all rows that match this condition.</p>
</div>
<div class="example"><p>Use <span class="keyword">SQL</span> to
update JOBTITLE:</p>
<pre> UPDATE EMPLOYEE
SET JOBTITLE = "Technician"
WHERE JOBTITLE = "Engineer"</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikdbdesign.htm" title="Use the following topics to determine what tables you require in your database and to understand the relationship between those tables.">Database design</a></div>
</div>
</div>
</body>
</html>