{"id":1074,"date":"2014-09-12T03:07:25","date_gmt":"2014-09-12T03:07:25","guid":{"rendered":"http:\/\/www.w3computing.com\/systemsanalysis\/?p=1074"},"modified":"2018-11-12T05:25:26","modified_gmt":"2018-11-12T05:25:26","slug":"normalization-steps-example","status":"publish","type":"post","link":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/","title":{"rendered":"Normalization, step by step with example"},"content":{"rendered":"<p>Normalization is the transformation of complex user views and data stores to a set of smaller, stable data structures. In addition to being simpler and more stable, normalized data structures are more easily maintained than other data structures.<\/p>\n<h2>The Three Steps of Normalization<\/h2>\n<p>Beginning with either a user view or a data store developed for a data dictionary (see Chapter 8), the analyst normalizes a data structure in three steps, as shown in the figure below. Each step involves an important procedure, one that simplifies the data structure.<\/p>\n<figure id=\"attachment_1027\" aria-describedby=\"caption-attachment-1027\" style=\"width: 184px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.10.three-steps-normalization.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1027\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.10.three-steps-normalization-184x300.jpg\" alt=\"Normalization of a relation is accomplished in three major steps.\" width=\"184\" height=\"300\" \/><\/a><figcaption id=\"caption-attachment-1027\" class=\"wp-caption-text\">Normalization of a relation is accomplished in three major steps.<\/figcaption><\/figure>\n<p>The relation derived from the user view or data store will most likely be unnormalized. The first stage of the process includes removing all repeating groups and identifying the primary key. To do so, the relation needs to be broken up into two or more relations. At this point, the relations may already be of the third normal form, but it is likely more steps will be needed to transform the relations to the third normal form.<\/p>\n<p>The second step ensures that all nonkey attributes are fully dependent on the primary key. All partial dependencies are removed and placed in another relation.<\/p>\n<p>The third step removes any transitive dependencies. A transitive dependency is one in which nonkey attributes are dependent on other nonkey attributes.<\/p>\n<h2>A Normalization Example<\/h2>\n<p>Figure shown below is a user view for the Al S. Well Hydraulic Equipment Company. The report shows the (1) SALESPERSON-NUMBER, (2) SALESPERSON-NAME, and (3) SALES-AREA. The body of the report shows the (4) CUSTOMER-NUMBER and (5) CUSTOMER-NAME. Next is the (6)WAREHOUSE-NUMBER that will service the customer, followed by the (7) WAREHOUSE-LOCATION, which is the city in which the company is located. The final information contained in the user view is the (8) SALES-AMOUNT. The rows (one for each customer) on the user view show that items 4 through 8 form a repeating group.<\/p>\n<figure id=\"attachment_1026\" aria-describedby=\"caption-attachment-1026\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.11.user-report.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1026\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.11.user-report-300x200.jpg\" alt=\"A user report for the Al S. Well Hydraulic Equipment Company.\" width=\"300\" height=\"200\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.11.user-report-300x200.jpg 300w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.11.user-report.jpg 563w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1026\" class=\"wp-caption-text\">A user report for the Al S. Well Hydraulic Equipment Company.<\/figcaption><\/figure>\n<p>If the analyst was using a data flow\/data dictionary approach, the same information in the user view would appear in a data structure. Figure below shows how the data structure would appear at the data dictionary stage of analysis. The repeating group is also indicated in the data structure by an asterisk (*) and indentation.<\/p>\n<figure id=\"attachment_1025\" aria-describedby=\"caption-attachment-1025\" style=\"width: 233px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.12-data-structure-in-data-dictionary.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1025\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.12-data-structure-in-data-dictionary.jpg\" alt=\"The analyst would find a data structure (from a data dictionary) useful in developing a database.\" width=\"233\" height=\"234\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.12-data-structure-in-data-dictionary.jpg 233w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.12-data-structure-in-data-dictionary-150x150.jpg 150w\" sizes=\"auto, (max-width: 233px) 100vw, 233px\" \/><\/a><figcaption id=\"caption-attachment-1025\" class=\"wp-caption-text\">The analyst would find a data structure (from a data dictionary) useful in developing a database.<\/figcaption><\/figure>\n<p>Before proceeding, note the data associations of the data elements in shown in the figure below. This type of illustration is called a bubble diagram or data model diagram. Each entity is enclosed in an ellipse, and arrows are used to show the relationships. Although it is possible to draw these relationships with an E-R diagram, it is sometimes easier to use the simpler bubble diagram to model the data.<\/p>\n<figure id=\"attachment_1024\" aria-describedby=\"caption-attachment-1024\" style=\"width: 179px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.13.-drawing-data-model-diagrams.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1024\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.13.-drawing-data-model-diagrams-179x300.jpg\" alt=\"Drawing data model diagrams for data associations sometimes helps analysts appreciate the complexity of data storage.\" width=\"179\" height=\"300\" \/><\/a><figcaption id=\"caption-attachment-1024\" class=\"wp-caption-text\">Drawing data model diagrams for data associations sometimes helps analysts appreciate the complexity of data storage.<\/figcaption><\/figure>\n<p>In this example, there is only one SALESPERSON-NUMBER assigned to each SALESPERSON-NAME, and that person will cover only one SALES-AREA, but each SALES-AREA may be assigned to many salespeople: hence, the double arrow notation from SALES-AREA to SALESPERSON-NUMBER. For each SALESPERSON-NUMBER, there may be many CUSTOMER-NUMBER(s).<\/p>\n<p>Furthermore, there would be a one-to-one correspondence between CUSTOMER-NUMBER and CUSTOMER-NAME; the same is true for WAREHOUSE-NUMBER and WAREHOUSE-LOCATION. CUSTOMER-NUMBER will have only one WAREHOUSE-NUMBER and WAREHOUSE-LOCATION, but each WAREHOUSE-NUMBER or WAREHOUSE-LOCATION may service many CUSTOMER-NUMBER(s). Finally, to determine the SALES-AMOUNT for one salesperson\u2019s calls to a particular company, it is necessary to know both the SALESPERSON-NUMBER and the CUSTOMER-NUMBER.<\/p>\n<p>The main objective of the normalization process is to simplify all the complex data items that are often found in user views. For example, if the analyst were to take the user view discussed previously and attempt to make a relational table out of it, the table would look like as shown below. Because this relation is based on our initial user view, we refer to it as SALES-REPORT.<\/p>\n<figure id=\"attachment_1023\" aria-describedby=\"caption-attachment-1023\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.14normalized-table.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1023\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.14normalized-table-300x108.jpg\" alt=\"If the data were listed in an unnormalized table, there could be repeating groups.\" width=\"300\" height=\"108\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.14normalized-table-300x108.jpg 300w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.14normalized-table.jpg 773w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1023\" class=\"wp-caption-text\">If the data were listed in an unnormalized table, there could be repeating groups.<\/figcaption><\/figure>\n<p>SALES-REPORT is an unnormalized relation, because it has repeating groups. It is also important to observe that a single attribute such as SALESPERSON-NUMBER cannot serve as the key. The reason is clear when one examines the relationships between SALESPERSON-NUMBER and the other attributes in the figure illustration below. Although there is a one-to-one correspondence between SALESPERSON-NUMBER and two attributes (SALESPERSON-NAME and SALES-AREA), there is a one-to-many relationship between SALESPERSON-NUMBER and the other five attributes (CUSTOMER-NUMBER, CUSTOMER-NAME, WAREHOUSE-NUMBER, WAREHOUSE-LOCATION, and SALES-AMOUNT).<\/p>\n<figure id=\"attachment_1022\" aria-describedby=\"caption-attachment-1022\" style=\"width: 251px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.15.data-model-diagram.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1022\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.15.data-model-diagram-251x300.jpg\" alt=\"A data model diagram shows that in the unnormalized relation, the SALESPERSON-NUMBER has a one-to-many association with some attributes.\" width=\"251\" height=\"300\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.15.data-model-diagram-251x300.jpg 251w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.15.data-model-diagram.jpg 503w\" sizes=\"auto, (max-width: 251px) 100vw, 251px\" \/><\/a><figcaption id=\"caption-attachment-1022\" class=\"wp-caption-text\">A data model diagram shows that in the unnormalized relation, the SALESPERSON-NUMBER has a one-to-many association with some attributes.<\/figcaption><\/figure>\n<p>SALES-REPORT can be expressed in the following shorthand notation:<br \/>\n<pre class=\"\u201dtoolbar:2 preserve-code-formatting\" nums:false nums-toggle:false lang:default decode:true &#8220;>SALES REPORT&nbsp;&nbsp;(SALESPERSON-NUMBER,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SALESPERSON-NAME, SALES-AREA,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CUSTOMER-NUMBER,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CUSTOMER-NAME,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WAREHOUSE-NUMBER,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WAREHOUSE-LOCATION,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SALES-AMOUNT))<\/pre><br \/>\nwhere the inner set of parentheses represents the repeated group.<\/p>\n<div id=\"subh\">FIRST NORMAL FORM (1NF)<\/div>\n<p>The first step in normalizing a relation is to remove the repeating groups. In our example, the unnormalized relation SALES-REPORT will be broken into two separate relations. These new relations will be named SALESPERSON and SALESPERSON-CUSTOMER. Figure below shows how the original, unnormalized relation SALES-REPORT is normalized by separating the relation into two new relations. Notice that the relation SALESPERSON contains the primary key SALESPERSON-NUMBER and all the attributes that were not repeating (SALESPERSON-NAME and SALES-AREA).<\/p>\n<figure id=\"attachment_1021\" aria-describedby=\"caption-attachment-1021\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.16.unnormalized-relation.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1021\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.16.unnormalized-relation-300x295.jpg\" alt=\"The original unnormalized relation SALES-REPORT is separated into two relations, SALESPERSON (3NF) and SALESPERSON-CUSTOMER (1NF).\" width=\"300\" height=\"295\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.16.unnormalized-relation-300x295.jpg 300w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.16.unnormalized-relation.jpg 748w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1021\" class=\"wp-caption-text\">The original unnormalized relation SALES-REPORT is separated into two relations, SALESPERSON (3NF) and SALESPERSON-CUSTOMER (1NF).<\/figcaption><\/figure>\n<p>The second relation, SALESPERSON-CUSTOMER, contains the primary key from the relation SALESPERSON (the primary key of SALESPERSON is SALESPERSON-NUMBER), as well as all the attributes that were part of the repeating group (CUSTOMER-NUMBER, CUSTOMER-NAME, WAREHOUSE-NUMBER, WAREHOUSE-LOCATION, and SALES-AMOUNT). Knowing the SALESPERSON-NUMBER, however, does not automatically mean that you will know the CUSTOMER-NAME, SALES-AMOUNT, WAREHOUSE-LOCATION, and so on. In this relation, one must use a concatenated key (both SALESPERSON-NUMBER and CUSTOMER-NUMBER) to access the rest of the information. It is possible to write the relations in shorthand notation as follows:<\/p>\n<p>The relation SALESPERSON-CUSTOMER is a first normal relation, but it is not in its ideal form. Problems arise because some of the attributes are not functionally dependent on the primary key (that is, SALESPERSON-NUMBER, CUSTOMER-NUMBER). In other words, some of the nonkey attributes are dependent only on CUSTOMER NUMBER and not on the concatenated key. The data model diagram in the figure illustration below shows that SALES-AMOUNT is dependent on both SALESPERSON-NUMBER and CUSTOMER-NUMBER, but the other three attributes are dependent only on CUSTOMER-NUMBER.<\/p>\n<figure id=\"attachment_1020\" aria-describedby=\"caption-attachment-1020\" style=\"width: 261px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.17-data-model-diagram.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1020\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.17-data-model-diagram-261x300.jpg\" alt=\"A data model diagram shows that three attributes are dependent on CUSTOMER-NUMBER, so the relation is not yet normalized. Both SALESPERSON-NUMBER and CUSTOMER-NUMBER are required to look up SALES-AMOUNT\" width=\"261\" height=\"300\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.17-data-model-diagram-261x300.jpg 261w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.17-data-model-diagram.jpg 485w\" sizes=\"auto, (max-width: 261px) 100vw, 261px\" \/><\/a><figcaption id=\"caption-attachment-1020\" class=\"wp-caption-text\">A data model diagram shows that three attributes are dependent on CUSTOMER-NUMBER, so the relation is not yet normalized. Both SALESPERSON-NUMBER and CUSTOMER-NUMBER are required to look up SALES-AMOUNT<\/figcaption><\/figure>\n<div id=\"subh\">SECOND NORMAL FORM (2NF)<\/div>\n<p>In the second normal form, all the attributes will be functionally dependent on the primary key. Therefore, the next step is to remove all the partially dependent attributes and place them in another relation. Figure below shows how the relation SALESPERSON-CUSTOMER is split into two new relations: SALES and CUSTOMER-WAREHOUSE. These<br \/>\nrelations can also be expressed as follows:<\/p>\n<figure id=\"attachment_1019\" aria-describedby=\"caption-attachment-1019\" style=\"width: 272px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.18-2nf-relation.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1019\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.18-2nf-relation-272x300.jpg\" alt=\"The relation SALESPERSON-CUSTOMER is separated into a relation called CUSTOMER-WAREHOUSE (2NF) and a relation called SALES (1NF).\" width=\"272\" height=\"300\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.18-2nf-relation-272x300.jpg 272w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.18-2nf-relation.jpg 723w\" sizes=\"auto, (max-width: 272px) 100vw, 272px\" \/><\/a><figcaption id=\"caption-attachment-1019\" class=\"wp-caption-text\">The relation SALESPERSON-CUSTOMER is separated into a relation called CUSTOMER-WAREHOUSE (2NF) and a relation called SALES (1NF).<\/figcaption><\/figure>\n<p>The relation CUSTOMER-WAREHOUSE is in the second normal form. It can still be simplified further because there are additional dependencies in the relation. Some of the nonkey attributes are dependent not only on the primary key, but also on a nonkey attribute. This dependency is referred to as a transitive dependency.<\/p>\n<p>Figure below shows the dependencies in the relation CUSTOMER-WAREHOUSE. For the relation to be a second normal form, all the attributes must be dependent on the primary key CUSTOMER-NUMBER, as shown in the diagram. WAREHOUSE-LOCATION, however, is obviously dependent on WAREHOUSE-NUMBER also. To simplify this relation, another step is required.<\/p>\n<figure id=\"attachment_1018\" aria-describedby=\"caption-attachment-1018\" style=\"width: 212px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.19-data-model-diagram.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1018\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.19-data-model-diagram-212x300.jpg\" alt=\"A data model diagram shows that a transitive dependency exists between WAREHOUSE-NUMBER and WAREHOUSE-LOCATION\" width=\"212\" height=\"300\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.19-data-model-diagram-212x300.jpg 212w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.19-data-model-diagram.jpg 305w\" sizes=\"auto, (max-width: 212px) 100vw, 212px\" \/><\/a><figcaption id=\"caption-attachment-1018\" class=\"wp-caption-text\">A data model diagram shows that a transitive dependency exists between WAREHOUSE-NUMBER and WAREHOUSE-LOCATION<\/figcaption><\/figure>\n<div id=\"subh\">THIRD NORMAL FORM (3NF)<\/div>\n<p>A normalized relation is in the third normal form if all the nonkey attributes are fully functionally dependent on the primary key and there are no transitive (nonkey) dependencies. In a manner similar to the previous steps, it is possible to break apart the relation CUSTOMER-WAREHOUSE into two relations, as shown in the figure below.<\/p>\n<figure id=\"attachment_1017\" aria-describedby=\"caption-attachment-1017\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.20.3nf-relation.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1017\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.20.3nf-relation-300x202.jpg\" alt=\"The relation CUSTOMER-WAREHOUSE is separated into two relations called CUSTOMER (1NF) and WAREHOUSE (1NF).\" width=\"300\" height=\"202\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.20.3nf-relation-300x202.jpg 300w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.20.3nf-relation.jpg 703w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1017\" class=\"wp-caption-text\">The relation CUSTOMER-WAREHOUSE is separated into two relations called CUSTOMER (1NF) and WAREHOUSE (1NF).<\/figcaption><\/figure>\n<p>The two new relations are called CUSTOMER and WAREHOUSE, and can be written as follows:<\/p>\n<p>The primary key for the relation CUSTOMER is CUSTOMER-NUMBER, and the primary key for the relation WAREHOUSE is WAREHOUSE-NUMBER.<\/p>\n<p>In addition to these primary keys, we can identify WAREHOUSE-NUMBER to be a foreign key in the relation CUSTOMER. A foreign key is any attribute that is nonkey in one relation but a primary key in another relation. We designated WAREHOUSE-NUMBER as a foreign key in the previous notation and in the figures by underscoring it with a dashed line: __________.<\/p>\n<p>Finally, the original, unnormalized relation SALES-REPORT has been transformed into four 3NF relations. In reviewing the relations shown in the figure below, one can see that the single relation SALES-REPORT was transformed into the following four relations:<\/p>\n<figure id=\"attachment_1016\" aria-describedby=\"caption-attachment-1016\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.21-er-diagram-1nfs.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1016\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.21-er-diagram-1nfs-300x280.jpg\" alt=\"The complete database consists of four 1NF relations called SALESPERSON, SALES, CUSTOMER, and WAREHOUSE.\" width=\"300\" height=\"280\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.21-er-diagram-1nfs-300x280.jpg 300w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.21-er-diagram-1nfs.jpg 742w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1016\" class=\"wp-caption-text\">The complete database consists of four 1NF relations called SALESPERSON, SALES, CUSTOMER, and WAREHOUSE.<\/figcaption><\/figure>\n<p>The third normal form is adequate for most database design problems. The simplification gained from transforming an unnormalized relation into a set of 3NF relations is a tremendous benefit when it comes time to insert, delete, and update information in the database.<\/p>\n<p>An E-R diagram for the database is shown in the figure below. One SALESPERSON serves many CUSTOMER(s), who generate SALES and receive their items from one WAREHOUSE (the closest WAREHOUSE to their location). Take the time to notice how the entities and attributes relate to the database.<\/p>\n<figure id=\"attachment_1015\" aria-describedby=\"caption-attachment-1015\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.22-entity-relationship-diagram.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1015\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.22-entity-relationship-diagram-300x204.jpg\" alt=\"An entity-relationship diagram for the Al S. Well Hydraulic Company database.\" width=\"300\" height=\"204\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.22-entity-relationship-diagram-300x204.jpg 300w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.22-entity-relationship-diagram.jpg 807w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1015\" class=\"wp-caption-text\">An entity-relationship diagram for the Al S. Well Hydraulic Company database.<\/figcaption><\/figure>\n<h2>Using the Entity-Relationship Diagram to Determine Record Keys<\/h2>\n<p>The E-R diagram may be used to determine the keys required for a record or a database relation. The first step is to construct the E-R diagram and label a unique (primary) key for each data entity. Figure below shows an E-R diagram for a customer order system. There are three data entities: CUSTOMER, with a primary key of CUSTOMER-NUMBER; ORDER, with a primary key of ORDER-NUMBER; and ITEM, with ITEM-NUMBER as the primary key. One CUSTOMER may place many orders, but each ORDER can be placed by one CUSTOMER only, so the relationship is one-to-many. Each ORDER may contain many ITEM(s), and each ITEM may be contained in many ORDER(s), so the ORDER-ITEM relationship is many-to-many.<\/p>\n<figure id=\"attachment_1014\" aria-describedby=\"caption-attachment-1014\" style=\"width: 300px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.23.entity-relationship-diagram.jpg\" rel=\"lightbox[1074]\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1014\" src=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.23.entity-relationship-diagram-300x51.jpg\" alt=\"An entity-relationship diagram for customer orders.\" width=\"300\" height=\"51\" srcset=\"https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.23.entity-relationship-diagram-300x51.jpg 300w, https:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.23.entity-relationship-diagram.jpg 758w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1014\" class=\"wp-caption-text\">An entity-relationship diagram for customer orders.<\/figcaption><\/figure>\n<p>A foreign key, however, is a data field on a given file that is the primary key of a different master file. For example, a DEPARTMENT-NUMBER indicating a student\u2019s major may exist on the STUDENT MASTER table. DEPARTMENT-NUMBER could also be the unique key for the DEPARTMENT MASTER table.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normalization is the transformation of complex user views and data stores to a set of smaller, stable data structures. In addition to being simpler and more stable, normalized data structures are more easily maintained than other data structures. The Three Steps of Normalization Beginning with either a user view or a data store developed for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16],"tags":[],"class_list":{"0":"post-1074","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-designing-databases","7":"entry","8":"has-post-thumbnail"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Normalization, step by step with example<\/title>\n<meta name=\"description\" content=\"Normalization is the transformation of complex user views and data stores to a set of smaller, stable data structures. In addition to being simpler and more stable\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Normalization, step by step with example\" \/>\n<meta property=\"og:description\" content=\"Normalization is the transformation of complex user views and data stores to a set of smaller, stable data structures. In addition to being simpler and more stable\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/w3computing\" \/>\n<meta property=\"article:published_time\" content=\"2014-09-12T03:07:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-12T05:25:26+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.10.three-steps-normalization-184x300.jpg\" \/>\n<meta name=\"author\" content=\"w3computing.com\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"w3computing.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/\"},\"author\":{\"name\":\"w3computing.com\",\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/#\\\/schema\\\/person\\\/8395166dc0b94b38a3aeb88dafbd63ce\"},\"headline\":\"Normalization, step by step with example\",\"datePublished\":\"2014-09-12T03:07:25+00:00\",\"dateModified\":\"2018-11-12T05:25:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/\"},\"wordCount\":1884,\"image\":{\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/13.10.three-steps-normalization-184x300.jpg\",\"articleSection\":[\"Designing Databases\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/\",\"url\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/\",\"name\":\"Normalization, step by step with example\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/13.10.three-steps-normalization-184x300.jpg\",\"datePublished\":\"2014-09-12T03:07:25+00:00\",\"dateModified\":\"2018-11-12T05:25:26+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/#\\\/schema\\\/person\\\/8395166dc0b94b38a3aeb88dafbd63ce\"},\"description\":\"Normalization is the transformation of complex user views and data stores to a set of smaller, stable data structures. In addition to being simpler and more stable\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/#primaryimage\",\"url\":\"http:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/13.10.three-steps-normalization-184x300.jpg\",\"contentUrl\":\"http:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/13.10.three-steps-normalization-184x300.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/normalization-steps-example\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Systems Analysis\",\"item\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Designing Databases\",\"item\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/designing-databases\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Normalization, step by step with example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/#website\",\"url\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.w3computing.com\\\/systemsanalysis\\\/#\\\/schema\\\/person\\\/8395166dc0b94b38a3aeb88dafbd63ce\",\"name\":\"w3computing.com\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Normalization, step by step with example","description":"Normalization is the transformation of complex user views and data stores to a set of smaller, stable data structures. In addition to being simpler and more stable","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/","og_locale":"en_US","og_type":"article","og_title":"Normalization, step by step with example","og_description":"Normalization is the transformation of complex user views and data stores to a set of smaller, stable data structures. In addition to being simpler and more stable","og_url":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/","article_publisher":"https:\/\/www.facebook.com\/w3computing","article_published_time":"2014-09-12T03:07:25+00:00","article_modified_time":"2018-11-12T05:25:26+00:00","og_image":[{"url":"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.10.three-steps-normalization-184x300.jpg","type":"","width":"","height":""}],"author":"w3computing.com","twitter_misc":{"Written by":"w3computing.com","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/#article","isPartOf":{"@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/"},"author":{"name":"w3computing.com","@id":"https:\/\/www.w3computing.com\/systemsanalysis\/#\/schema\/person\/8395166dc0b94b38a3aeb88dafbd63ce"},"headline":"Normalization, step by step with example","datePublished":"2014-09-12T03:07:25+00:00","dateModified":"2018-11-12T05:25:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/"},"wordCount":1884,"image":{"@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/#primaryimage"},"thumbnailUrl":"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.10.three-steps-normalization-184x300.jpg","articleSection":["Designing Databases"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/","url":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/","name":"Normalization, step by step with example","isPartOf":{"@id":"https:\/\/www.w3computing.com\/systemsanalysis\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/#primaryimage"},"image":{"@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/#primaryimage"},"thumbnailUrl":"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.10.three-steps-normalization-184x300.jpg","datePublished":"2014-09-12T03:07:25+00:00","dateModified":"2018-11-12T05:25:26+00:00","author":{"@id":"https:\/\/www.w3computing.com\/systemsanalysis\/#\/schema\/person\/8395166dc0b94b38a3aeb88dafbd63ce"},"description":"Normalization is the transformation of complex user views and data stores to a set of smaller, stable data structures. In addition to being simpler and more stable","breadcrumb":{"@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/#primaryimage","url":"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.10.three-steps-normalization-184x300.jpg","contentUrl":"http:\/\/www.w3computing.com\/systemsanalysis\/wp-content\/uploads\/2014\/09\/13.10.three-steps-normalization-184x300.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.w3computing.com\/systemsanalysis\/normalization-steps-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Systems Analysis","item":"https:\/\/www.w3computing.com\/systemsanalysis\/"},{"@type":"ListItem","position":2,"name":"Designing Databases","item":"https:\/\/www.w3computing.com\/systemsanalysis\/designing-databases\/"},{"@type":"ListItem","position":3,"name":"Normalization, step by step with example"}]},{"@type":"WebSite","@id":"https:\/\/www.w3computing.com\/systemsanalysis\/#website","url":"https:\/\/www.w3computing.com\/systemsanalysis\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.w3computing.com\/systemsanalysis\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.w3computing.com\/systemsanalysis\/#\/schema\/person\/8395166dc0b94b38a3aeb88dafbd63ce","name":"w3computing.com"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4NNeA-hk","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/posts\/1074","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/comments?post=1074"}],"version-history":[{"count":0,"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/posts\/1074\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/media?parent=1074"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/categories?post=1074"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.w3computing.com\/systemsanalysis\/wp-json\/wp\/v2\/tags?post=1074"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}