Premium Essay

Normalization

In:

Submitted By schnyder01
Words 326
Pages 2
Normalization
November 7, 2012

Normalization
• • • • Primary Key Primary Key Foreign Key Functional Dependency i l d Normal Form
– First Normal Form – Second Normal Form – Third Normal Form

Normalization Normalization ‐ Objective
• Identify placement of columns with tables Identify placement of columns with tables • Reduce anomalies
–I Insert t – Update – Delete

Student Table Not Normalized Student Table – Not Normalized

Student Table Student Table ‐ Analysis
• Problems? • Side effects if tables are not sufficiently normalized • Are there database anomalies?
– Insert – Update – Delete

• Duplication? p

Database Anomalies Database Anomalies ‐ Discuss
• Insert • Update • Delete l

Student Table Student Table ‐ Normalized
• • • • Apply three levels of normalization Apply three levels of normalization First Normal Form (1NF) Second Normal Form (2NF) S d l (2 ) Third Normal Form (3NF)

Normal Form Normal Form ‐ First
• First Normal Form First Normal Form • 1NF • No multi values in a cell li l i ll

Normal Form Normal Form ‐ First
SID 1111 2222 2244 SFIRST SALLY BO MARY SLAST SMITH LI JONES SPHONE 718‐555‐1212 917‐208‐9449 718‐997‐3500 718‐444‐1313 646‐555‐1112

Normal Form Normal Form ‐ Second
• Functional Dependency Functional Dependency • Primary Key • Foreign Key i

Functional Dependency Functional Dependency
• Each value of X is associated with on Y value ac a ue o s assoc ated t o a ue • X  Y Staff_ID  Staff_Address. Assuming staff • Staff ID  Staff Address. Assuming staff address is single value. • Each staff is associated with only one address y • If this is true, then there is a functional dependency • If this is not true, then need to create a functional dependency

Functional Dependency Functional Dependency
• Staff ID  Staff Name Staff_ID  Staff Name • Each staff ID is associated to one

Similar Documents

Free Essay

Normalization

...Normalization In normalized database, the database has more number of tables. As normalization means creating more tables from lesser ones. As the numbers of tables created are higher, the more joints will be needed to get at the data. Normalization normally removes the duplicity i.e. redundant data which results in increase in database performance. Impacts of Normalization on Database Performance Normalization has various impacts on database performance. These are: 1. Removal of Redundancy: Normalization increases performance by removing the redundancy. 2. Less Storage Space: Normalization results into less storage space, because the redundant data is removed. 3. Reliability: It helps in producing the reliable information. 4. Efficient System: In order to provide efficient system, Normalization plays a very important role. In spite of increasing performance, Normalization requires much access time to execute the queries. Moreover, it also needs more number of joints. Example: We have two tables i.e. orders and customers 1. Orders table: * Select * from orders; Order_id | Order_name | Customer_id | 1 | Order_1 | 1 | 2 | Order_2 | 8 | 4 | Order_4 | 2 | 5 | Order_5 | 3 | 7 | Order_7 | 3 | 9 | Order_9 | 1 | 10 | Order_10 | 3 | 2. Customers table: * Select * from customers; Customer_id | Customer_name | 1 | Customer1 | 3 | Customer3 | 5 | Customer5 | * select * from db.orders O INNER JOIN db.customers C ON O.Customer_ID=...

Words: 662 - Pages: 3

Premium Essay

Normalization

...Chapter 5 Normalization of Database Tables Discussion Focus Why are some table structures considered to be bad and others good and how do you recognize the difference between good and bad structures? From an information management point of view, possibly the most vexing and destructive problems are created through uncontrolled data redundancies. Such redundancies produce update and delete anomalies that create data integrity problems. The loss of data integrity can destroy the usefulness of the data within the database. (If necessary, review Chapter 1, Section 1.4.4, “Data Redundancy”, to make sure that your students understand the terminology and that they appreciate the dangers of data redundancy.) Table structures are poor whenever they promote uncontrolled data redundancy. For example, the table structure shown in Figure IM5.1 is poor because it stores redundant data. In this example, the AC_MODEL, AC_RENT_CHG, and AC_SEATS attributes are redundant. (For example, note that the hourly rental charge of $58.50 is stored four times, once for each of the four Cessna C-172 Skyhawk aircraft – check records 1, 2, 4, and 9.) Figure IM5.1 A Poor Table Structure [pic] |[pic] The figures shown in this discussion show the contents of the IM_Discussion database. This database is located on the teacher’s CD. The | |Student Online Companion also includes SQL script files (Oracle and SQLServer) for all of the data sets used throughout the book. ...

Words: 9797 - Pages: 40

Premium Essay

Normalization

...1.Introduction Relational database design theory is mainly based on a class of constraints called Functional Dependencies (FDs).FDs are a generalization of keys. This theory defines when a relation is in normal form (e.g., in Third Normal Form or 3NF) for a given set of FDs. It is usually a sign of bad DB design if a schema contains relations that violate the normal form requirements. If a normal form is violated, data is stored redundantly, and information about different concepts is intermixed. To reduce the redundancy in a given relation we need to decompose it in two or more sub relations . Decomposition into highest normal forms required maintaining properties like loss less join decomposition and dependency preserving decomposition. To normalize a relation R we have to remove certain dependencies that exist in it like partial dependency& transitive dependency. Basic definitions 1.1 Functional dependency: In a given table, an attribute Y is said to have a functional dependency on a set of attributes X (written X → Y) if and only if each X value is associated with precisely one Y value. For example, in an "Employee" table that includes the attributes "Employee ID" and "Employee Date of Birth", the functional dependency {Employee ID} → {Employee Date of Birth} would hold. It follows from the previous two sentences that each {Employee ID} is associated with precisely one {Employee Date of Birth}. 1.2 Trivial functional dependency A trivial functional dependency...

Words: 2812 - Pages: 12

Premium Essay

Normalization

...Normalization of the ERD The Huffman Trucking Database (HTD) is normalizing up to 3NF level. The first step in normalizing is to fine the candidate key in the database. The “Employer ID Number”, “Driver Log ID”, and “Citation Number” are candidate keys in the database. First Normal Form (1NF) values of a database are: • Each column must have a unique name. • The order of the rows and columns doesn’t matter. • Each column must have a single data type. • No two rows can contain identical values. • Each column must contain a single value. • Columns cannot contain repeating groups. The tables in HTD consists unique names and each column has a single data type. Each table consists of primary key, which makes the row contain identical values. The HTD passes all the requirement of firs normal form. Second Normal Form (2NF) form with two conditions: • The table is in 1NF. • All the non key fields depend upon on all the key fields. All the three tables are depending upon the primary key or key fields; this makes the table to update anomalies. The HTD passes the requirement of second normal form Third Normal Form (3NF) form with two conditions: • The table is in 1NF. • It contains no transitive dependencies. A transitive dependency is when one non-key field’s value depends on another non-key field’s value. The drives log table need to driver log key to form 3NF, because Employee ID, Date, and Tractor ID are inter dependent. The other two table are depend upon the primary...

Words: 257 - Pages: 2

Premium Essay

Normalization

...Assignment 2 Normalization Table of Contents 1. Introduction to Normalization 2. Steps to Convert Database Table into First, Second and Third Normal Forms 3. Illustration – Reason to Convert Database Table into First, Second and Third Forms 4. Explain Situations when De-Normalization is Acceptable with an Illustration 5. Impact of Business Rules on Database Normalization and Decision to De- normalize it 1. Normalization The process to organize a data in a database efficiently is termed as Normalization. With an aim to eliminate redundant data and ensuring the logic of data dependency, normalization is a process used by various businesses and colleges for efficient data recording. It helps in storing the data logically and reduces the space taken by it. To normalize a database, one uses a prescribed set of series which are termed as normal forms. There are typically three normal forms – first or 1NF, second or 2NF, third or 3NF. Practically only these three forms are applied, however sometimes 4NF and 5NF can be used. 2. Steps to Convert Database Table into First, Second and Third Normal Forms To convert an unorganized database table into first, second and third normal forms; following steps shall be applied: 2.1 Conversion to First Normal Form While converting the database table to 1NF, you should follow these guidelines – * Remove duplicity by eliminating those columns from the database table that appear more than once. * Related data should be organized...

Words: 1012 - Pages: 5

Premium Essay

Normalization

...1. Premiere Products Complete the Premiere Products Exercises in Chapter 5 - Name your Answers Last Name Normalization (i.e. Smith Normalization). Submit the assignment in a word document under the week's Assignment 1. Using your knowledge of Premiere Products, determine the functional dependencies that exist in the following table. After determining the functional dependencies, convert this table to an equivalent collection of tables that are in third normal form. Part (PartNum, Description, OnHand, Class, Warehouse, Price, (OrderNum, OrderDate, CustomerNum, CustomerName, RepNum, LastName, FirstName, NumOrdered, QuotedPrice)) 2. List the functional dependencies in the following table that concerns invoicing (an application Premiere Products is considering adding to its database), subject to the specified conditions. For a given invoice (identified by the InvoiceNum), there will be a single customer. The customer’s number, name, and complete address appear on the invoice, as does the date. Also, there may be several different parts appearing on the invoice. For each part that appears, display the part number, description, price, and number shipped. Each customer that orders a particular part pays the same price. Convert this table to an equivalent collection of tables that are in third normal form. Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State, Zip, Date, (PartNum, Description, Price, NumShipped)) 3. The requirements for Premiere Products...

Words: 351 - Pages: 2

Premium Essay

Normalization

...Normalization of Database Tables l 4 4 4 Introduction to Normalization of Database Tables Normalization of Database Tables ISM 602 Dr. Hamid Nemati Introduction to Normalization of Database Tables 4 4 4 Objectives The idea of Dependencies of Attributes Normalization and Database Design Understand concepts of normalization (Higher-Level Normal Forms) Learn how to normalize tables Understand normalization and database design issues Denomalization Functional Dependency l Introduction to Normalization of Database Tables Examples of Functional Dependencies: l Introduction to Normalization of Database Tables l l A Functional Dependency Is A Relationship Between Or Among Attributes Such That The Values Of One Attribute Depend On, Or Are Determined By, The Values Of The Other Attribute(s). Partial Dependency: Is A Relationship Between Attributes Such That The Values Of One Attribute Is Dependent On, Or Determined By, The Values Of Another Attribute Which Is Part Of The Composite Key. Partial Dependencies Are Not Good Due To duplication Of Data And Update Anomalies; l l If we know an ISBN, then we know the Book Title and the author(s) l ISBN è Book Title l ISBN è Author(s) If we know the VIN, then we know who is the Auto owner l VIN è Auto_Owner If we know Student-ID (SID), then we can uniquely determine his/her Name l SID è S_Name Transitive Dependencies l Introduction to Normalization of Database Tables So Now what is Normalization...

Words: 1733 - Pages: 7

Premium Essay

Normalization

...Data Dictionary and Normalization Guidelines The purpose of a data dictionary is to define the objects and data within an organization's database management system. This metadata does not contain any of the database's data, but only information about the structure, storage and use of the database's data. A data dictionary can be stored in files or documents, or can be stored within a database in the DBMS. For example, a database may contain an employee table that has an emp_no column and an identification_no column. A data dictionary can explain that the emp_no column is an integer value containing the employee number assigned by the system. When a new employee is added to the system, a next number value is retrieved from a next number table and assigned to the new employee record. The data dictionary would also explain that the identification_no column is an alpha-numeric value that contains the employee's social security number for US residents and for non-US residents contains the employee's country code followed by their work visa number. The data dictionary can also be used to define aliases for the column names since column names can become a bit cryptic. It can also provide information regarding different type of database objects such as tables, views, stored procedure, user groups, functions, triggers, etc. Furthermore, it can also provide information on how database objects are related to one another. An important aspect of a data dictionary is that it provides...

Words: 874 - Pages: 4

Premium Essay

Normalization

...NORMALIZATION The process of normalization begins with a user view of some kind (Report, Table, Screen display, Document, etc...). This view should be about some kind of important data (Invoice, Purchase order, Project details, Registration form, etc....). Example: Consider the following Project Management Report Project Management Report Project Code: PC010 Project Manager: M. Philips Project Title: Database System Project budget: 240.000$ Employee No. Emp. Name Dept ID Dept Name Hourly Rate S-1001 A. Smith L004 IT 22$ S-2310 L. Ferguson L007 HR 25$ S-5561 F. Macleod L004 IT 21$ S-0024 A. Jones L009 Accounting 18$ Total Staff on Project: 4 Average Rate: 21$ The main objective of the normalization is to extract, out of this view, the normalized tables: All the necessary detailed tables along with their attributes (fields) and identifiers (primary keys). The first step of normalization is to copy all the data fields of the form and put them into a single relation (table) with a specific identifier (main primary key). Project data (Proj_Code, Title, Manager, Budget, Emp_Id, Emp_Name, Dept_Id, Dept_Name, Hour_Rate) PS: We did not include the fields "total staff number" and "Average rate" because they are calculated fields, so no need to put them or save them into the relation. Then we have to go through three main steps, from one form into another form...

Words: 1048 - Pages: 5

Premium Essay

Normalization in Databases

...1- Introduction 2- Why to Normalize? 3- Normalization & Its types. 4- Applications of Normalization. 5- Conclusion Introduction While working with databases, one must have got chances to hear the term normalization. If someone asks "Is that database normalized?" or "Is that in BCNF?" All too often, the reply is "Uh, yeah." Normalization is often brushed aside as a luxury that only academics have time for. However, knowing the principles of normalization and applying them to daily database design tasks really isn't all that complicated and it could drastically improve the performance of DBMS. In this report, I'll introduce the concept of normalization and take brief look at the most common normal forms. Why to normalize? While designing a database, the main problem existing in that “raw” database is redundancy. Redundancy is storing the same data item in more one place. A redundancy creates several problems like the following: 1. Extra storage space 2. Entering same data more than once. 3. Deleting data from more than one place. 4. Modifying data in more than one place. 5. Anomalies may occur in the database if insertion, deletion, modification etc are not done properly. It creates inconsistency and unreliability in the database. To solve these problems, the “raw” database needs to be normalized. Normalization Normalization is the process of efficiently organizing data...

Words: 1576 - Pages: 7

Premium Essay

Database Normalization

...Running Head: DATABASE NORMALIZATION Database Normalization *************** IST 7000 October 2006 Table of Contents ABSTRACT 3 Brief overview 4-5 Types of Normal Forms 5-9 Advantages and Disadvantages 9-10 Normalization Best practices 10-11 Conclusion 11-12 References 13 Appendix A 14 Example Normal Form Diagrams 15 Abstract In relational databases, normalization is a process that is used to eliminate redundancy, reduce the potential for anomalies during data processing, and maintain data consistency and integrity through out the database. It is a design technique used primarily as a guide in designing relational databases. Normalization is essentially a two step process that puts data into tabular form by removing repeating groups and then removes duplicated data from the relational tables. The theory of normalization is based on the concept of normal forms introduced by Edgar F. Codd in 1970. I choosed this topic because this is one of the areas in my role as a database administrator where I’m weak. During my training as a database administrator, I was never really offered a database design class, however, while at work, I have been occasionally given the challenging task of reviewing a data model and giving...

Words: 3045 - Pages: 13

Premium Essay

Normalization of Databaes

...Normalization in Databases In the process of working with databases, one must have been asked "Is that database normalized?" Usually, the reply is "Uh, yeah." Normalization is often forgotten about, touted as a luxury that only scholars have time for. However, knowing the principles of normalization and applying them to daily database design tasks really isn't all that complicated and it could drastically improve the performance of DBMS. The main problem plaguing database design is redundancy. Redundancy is storing the same data item in more one place. Redundancy creates several problems, taking up extra storage space, entering same data more than once, deleting data from more than one place, and modifying data in more than one place. It creates inconsistency and unreliability in the database. In order to solve these problems, the “raw” database needs to be normalized. Normalization is the process of efficiently organizing data in a database. There are two goals of the normalization process. The first goal of normalization is to eliminate redundant data (for example, storing the same data in more than one table). The second goal is to ensure data dependencies make sense (only storing related data in a table). Both of these are important goals as they reduce the amount of space a database consumes and ensure that data is logically stored. Un-Normalized Form (UNF) If a table contains non-atomic values at each row, it is said to be in UNF. An atomic value is something...

Words: 1000 - Pages: 4

Premium Essay

Database Normalization

...Microsoft products). BTW: For a more practical, down-to-Earth English-oriented explanation of the 5 Normal forms, visit my Database Normalization eBook page. Definition of terms Now, first a few definitions about database normalization: I cite a few as I have found them in the Hyper dictionary on the Internet, though you may find a number of differing definitions around. We are dealing with the "Relational Model" as the basis for our relational databases. The relational model as I see it is Definition: A data model introduced by E.F. Codd in 1959/1970, particularly well suited for business data management. In this model, data are organized in tables. The set of names of the columns is called the "schema" of the table.". The work of E. F. Codd, and also Chris Date, is based on relational algebra, which is well outside the scope of this article. Database model: The product (outcome) of the database design process which aims to identify and organize the required data conceptually and logically. A database model tells you what information is to be contained in a particular database, how the information will be used, and how the items in the database will be related to each other. A well thought-out database model reduces the need for changes. Future systems may re-use parts of existing models, which should lower development costs. Database Normalization: A series of steps followed to obtain a database...

Words: 767 - Pages: 4

Premium Essay

Normalization in Dbms

...Normalization Normalization is a method for organizing data elements in a database into tables. Normalization Avoids * Duplication of Data – The same data is listed in multiple lines of the database * Insert Anomaly – A record about an entity cannot be inserted into the table without first inserting information about another entity – Cannot enter a customer without a sales order * Delete Anomaly – A record cannot be deleted without deleting a record about a related entity. Cannot delete a sales order without deleting all of the customer’s information. * Update Anomaly – Cannot update information without changing information in many places. To update customer information, it must be updated for each sales order the customer has placed Normalization is a three stage process – After the first stage, the data is said to be in first normal form, after the second, it is in second normal form, after the third, it is in third normal form Before Normalization 1. Begin with a list of all of the fields that must appear in the database. Think of this as one big table. 2. Do not include computed fields 3. One place to begin getting this information is from a printed document used by the system. 4. Additional attributes besides those for the entities described on the document can be added to the database. Before Normalization – Example See Sales Order from below: Fields in the original data table will be as follows: SalesOrderNo | Date |...

Words: 865 - Pages: 4

Premium Essay

Premier Products Normalization

...Premiere Products Exercises The following exercises are based on the Premiere Products database. 1. Using your knowledge of Premiere Products, determine the functional dependencies that exist in the following table. After determining the functional dependencies, convert this table to an equivalent collection of tables that are in third normal form. Part (PartNum, Description, OnHand, Class, Warehouse, Price, (OrderNum, OrderDate, CustomerNum, CustomerName, RepNum, LastName, FirstName, NumOrdered, QuotedPrice) ) The functional dependencies are as follows: PartNum—Description OnHand Class WareHouse Price OrderNum—OrderDate CustomerNum CustomerNum—CustomerName RepNum RepNum—LastName FirstName PartNum, OrderNum—NumOrdered QuotedPrice New tables would be as follows: Part (PartNum, Description, OnHand, Class, Warehouse, Price) OrderLine (PartNum, OrderNum) NumOrdered, QuotedPrice) Rep (RepNum, LastName, FirstName) Customer (CustomerNum, CustomerName, RepNum) Orders (OrderNum, OrderDate, CustomerNum) 2. List the functional dependencies in the following table that concerns invoicing (an application Premiere Products is considering adding to its database), subject to the specified conditions. For a given invoice (identified by the InvoiceNum), there will be a single customer. The customer’s number, name, and complete address appear on the invoice, as...

Words: 448 - Pages: 2