Class Presentation: Normal Form By Wen Ying Gao CS157A Section 2 October 20, 2005.

Slides:



Advertisements
Similar presentations
Normalization By Jason Park Fall 2005 CS157A. Database Normalization Database normalization is the process of removing redundant data from your tables.
Advertisements

Chapter Three Objectives Identification of Keys Application of primary and foreign keys Converting a database design to Relational DB. What is a good DBMS.
 Definition  Components  Advantages  Limitations Contents  Definition Definition  Normal Forms Normal Forms  First Normal Form First Normal Form.
Boyce-Codd NF Takahiko Saito Spring 2005 CS 157A.
Normalization What is it?
Normalisation Ensuring data integrity in database design 1.
Functional Dependency CS157a Sec. 2 Koichiro Hongo.
Accounting 6500 Relational Databases: Accounting Applications Introduction to Normalization.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Why Normalization? To Reduce Redundancy to 1.avoid modification, insertion, deletion anomolies 2.save space Goal: One Fact in One Place.
Bad DB Design Duplicate of data Duplicate of data Updating Updating Deleting Deleting.
Introduction to Databases
Normalization.
Week 6 Lecture Normalization
Modelling Techniques - Normalisation Description and exemplification of normalisation.Description and exemplification of normalisation. Creation of un-normalised.
Normalization. Database Normalization Database normalization is the process of removing redundant data from your tables in to improve storage efficiency,
Cambridge TEC - Level 3 Certificate/Diploma IT. ICT Dept ScenarioLO1LO2LO3.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
CBAD2103 Data Analysis and Modeling. Chapter 7 Conceptual Design Methodology.
Chapter 3: Relational Model I Structure of Relational Databases Structure of Relational Databases Convert a ER Design to a Relational Database Convert.
Avoiding Database Anomalies
NormalizationNormalization Chapter 4. Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties,
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
The Relational Model and Normalization R. Nakatsu.
Module III: The Normal Forms. Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form. The database.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
Copyright Ó Oracle Corporation, All rights reserved. Normalization Use the student note section below for further explanation of the slide content.Use.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
In this chapter, you learn about the following: ❑ Anomalies ❑ Dependency and determinants ❑ Normalization ❑ A layman’s method of understanding normalization.
Chapter 7 1 Database Principles Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that.
CORE 2: Information systems and Databases NORMALISING DATABASES.
FEN Quality checking table design: Design Guidelines Normalisation Table Design Is this OK?
Normal Forms through BCNF CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
1 5 Normalization. 2 5 Database Design Give some body of data to be represented in a database, how do we decide on a suitable logical structure for that.
Customer Order Order Number Date Cust ID Last Name First Name State Amount Tax Rate Product 1 ID Product 1 Description Product 1 Quantity Product 2 ID.
Unit 4 Object Relational Modeling. Key Concepts Object-Relational Modeling outcomes and process Relational data model Normalization Anomalies Functional.
Unit 4 Normalisationand Relational Database Management Systems.
Lecture No 14 Functional Dependencies & Normalization ( III ) Mar 04 th 2011 Database Systems.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Lecture Nine: Normalization
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
Normalization. 2 u Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data,
Database Terms t DBMS –Database Management System. A software used to organise, analyse, store, retrieve, and edit information. –e.g., Visual FoxPro, Access.
Normalisation RELATIONAL DATABASES.  Last week we looked at elements of designing a database and the generation of an ERD  As part of the design and.
The Normal Forms 3NF and BCNF
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Logical Database Design and the Relational Model.
IST 220 – Intro to DB Lecture 4 Database Design thru ER Modeling.
Normalisation 1NF to 3NF Ashima Wadhwa. In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third.
Lecture 4: Logical Database Design and the Relational Model 1.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
NORMALIZATION Handout - 4 DBMS. What is Normalization? The process of grouping data elements into tables in a way that simplifies retrieval, reduces data.
Logical Database Design and Relational Data Model Muhammad Nasir
Microsoft Access CS 110 Fall Entity Relationship Model Entities Entities Principal data object about which information is to be collectedPrincipal.
MS Access. Most A2 projects use MS Access Has sufficient depth to support a significant project. Relational Databases. Fairly easy to develop a good user.
Lecture # 17 Chapter # 10 Normalization Database Systems.
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
NORMALISATION OF DATABASES. WHAT IS NORMALISATION? Normalisation is used because Databases need to avoid have redundant data, which makes it inefficient.
Normal Forms 1NF – A table that qualifies as a relation is in 1NF. (Back)(Back) 2NF – A relation is in 2NF if all of its nonkey attributes are dependent.
Understanding Data Storage
Database, tables and normal forms
Revised: 2 April 2004 Fred Swartz
SEEM3430: Information Systems Analysis and Design
Database Normalization
Entity relationship diagrams
Normalization By Jason Park Fall 2005 CS157A.
Normalization By Jason Park Fall 2005 CS157A.
Presentation transcript:

Class Presentation: Normal Form By Wen Ying Gao CS157A Section 2 October 20, 2005

Database Normalization Database normalization relates to the level of redundancy in a relational database’s structure. The key idea is to reduce the chance of having multiple different versions of the same data, like an address, by storing all potentially duplicated data in different tables and linking to them instead of using a copy.

First Normal Form The domains of all attributes of a relation schema R are atomic, which is if elements of the domain are considered to be indivisible units. It involves that removal of redundant data from horizontal rows. We need to ensure that there is no duplication of data in a given row, and that every column stores the least amount of information possible.

Example: A table for the entity of Book TitleAuthorISBNSubjectPublisherPages Database System Concepts Sudarshan DatabaseMcGraw-Hill1142 Database System Concepts Silberschatz DatabaseMcGraw-Hill1142 The Ultimate Guide Das UnixMcGraw-Hill445 The Ultimate Guide Korth UnixMcGraw-Hill445

By applying the first normal form, we will have to construct separate tables for the redundant data with extra tables to define the relationship between the tables. Author_IDLast NameFirst Name 1SudarshanMark 2SilberschatzAbraham 3DasSumitabha 4KorthHenry * Here we have the table for author. Subject_IDSubject 1Database 2Unix * Here we have the table for subject. ISBNTitlePagesPublisher Database System Concepts1142McGraw-Hill The Ultimate Guide445McGraw-Hill * Here we have the table for book.

Since the tables had separated in order to avoid redundancy, we also need to create new tables to connect each table so that their relationship between each table will remain unchanged. ISBNAuthor_ID * Here we have the relationship between the book and the author. ISBNSubject_ID * Here we have the relationship between the book and the subject.

Second Normal Form If each attribute A in a relation schema R meets one of the following criteria: It must be in first normal form. It is not partially dependent on a candidate key. Every non-key attribute is fully dependent on each candidate key of the relation. Second Normal Form (or 2NF) deals with redundancy of data in vertical columns.

Example of Second Normal Form: Here is a list of attributes in a table that is in First Normal Form: Department Project_Name Employee_Name Emp_Hire_Date Project_Manager Project_Name and Employee_Name are the candidate key for this table. Emp_Hire_Date and Project_Manager are partially depend on the Employee_Name, but not depend on the Project_Name. Therefore, this table will not satisfy the Second Normal Form.

In order to satisfy the Second Normal Form, we need to put the Emp_Hire_Date and Project_Manager to other tables. We can put the Emp_Hire_Date to the Employee table and put the Project_Manager to the Project table. So now we have three tables: DepartmentProject Project_NameProject_ID Employee_NameProject_Name Project_Manager Employee Employee_ID Employee_Name Employee_Hire_Date Now, the Department table will only have the candidate key left.

Third Normal Form A relation R is in Third Normal Form (3NF) if and only if it is: in Second Normal Form. Every non-key attribute is non-transitively dependent on the primary key. An attribute C is transitively dependent on attribute A if there exists an attribute B such that A  B and B  C, then A  C.

Example of Third Normal Form: Here is the Second Normal Form of the table for the invoice table: It violates the Third Normal Form because there will be redundancy for having multiple invoice number for the same customer. In this example, Jones had both invoice 1001 and 1003.

To solve the problem, we will have to have another table for the customers. By having Customer table, there will be no transitive relationship between the invoice number and the customer name and address. Also, there will not be redundancy on the customer information.

There will be more examples for the First, Second, and Third Normal Forms. The following is the example of a table that change from each of the normal forms.

First Normal Form: s# -- supplier identification number (this is the primary key) status -- status code assigned to city -- city name of city where supplier is located p# -- part number of part supplied qty -- quantity of parts supplied to date

Second Normal Form: Functional Dependency on First Normal Form: s# —> city, status (this violated the Second Normal Form) city —> status (s#,p#) —>qty

Third Normal Form: Functional Dependency of the Second Normal Form: SUPPLIER.s# —> SUPPLIER.status (Transitive dependency) SUPPLIER.s# —> SUPPLIER.city SUPPLIER.city —> SUPPLIER.status

Reference: rm7.html intro-to-normalization.html normalisation/2nf.html normal_form_definitions.html