DATABASE NORMALIZATION



Similar documents
Normalization. Normalization. Normalization. Data Redundancy

Normalization. Purpose of normalization Data redundancy Update anomalies Functional dependency Process of normalization

Lecture 2 Normalization

DBMS. Normalization. Module Title?

Normalization in Database Design

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Normalization of Database

DATABASE DESIGN: NORMALIZATION NOTE & EXERCISES (Up to 3NF)

COSC344 Database Theory and Applications. Lecture 9 Normalisation. COSC344 Lecture 9 1

Normalisation 6 TABLE OF CONTENTS LEARNING OUTCOMES

Normalisation to 3NF. Database Systems Lecture 11 Natasha Alechina

DATABASE SYSTEMS. Chapter 7 Normalisation

Chapter 10. Functional Dependencies and Normalization for Relational Databases

MCQs~Databases~Relational Model and Normalization

Functional Dependency and Normalization for Relational Databases

Theory of Relational Database Design and Normalization

Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms.

Functional Dependencies and Finding a Minimal Cover

Normal forms and normalization

CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University

Chapter 6. Database Tables & Normalization. The Need for Normalization. Database Tables & Normalization

DATABASE DESIGN: Normalization Exercises & Answers

Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases

Theory of Relational Database Design and Normalization

A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ:

Normalization. Functional Dependence. Normalization. Normalization. GIS Applications. Spring 2011

Chapter 10 Functional Dependencies and Normalization for Relational Databases

Chapter 10. Functional Dependencies and Normalization for Relational Databases. Copyright 2007 Ramez Elmasri and Shamkant B.

Database Design and Normalization

RELATIONAL DATABASE DESIGN

Schema Refinement, Functional Dependencies, Normalization

Topic 5.1: Database Tables and Normalization

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Design of Relational Database Schemas

Database Management System

Fundamentals of Database System

Introduction to normalization. Introduction to normalization

Normalization in OODB Design

Normalization. Reduces the liklihood of anomolies

CSCI-GA Database Systems Lecture 7: Schema Refinement and Normalization

Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES

Database Design Methodologies

CS143 Notes: Normalization Theory

Chapter 9: Normalization

Module 5: Normalization of database tables

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

Part 6. Normalization

7.1 The Information system

Normalization. CIS 3730 Designing and Managing Data. J.G. Zheng Fall 2010

Database Systems Concepts, Languages and Architectures

Announcements. SQL is hot! Facebook. Goal. Database Design Process. IT420: Database Management and Organization. Normalization (Chapter 3)

Databases -Normalization III. (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31

C# Cname Ccity.. P1# Date1 Qnt1 P2# Date2 P9# Date9 1 Codd London Martin Paris Deen London

Introduction Decomposition Simple Synthesis Bernstein Synthesis and Beyond. 6. Normalization. Stéphane Bressan. January 28, 2015

Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010

Functional Dependencies

BCA. Database Management System

Normalization. Normalization. First goal: to eliminate redundant data. for example, don t storing the same data in more than one table

Functional Dependencies and Normalization

DATABASE MANAGEMENT SYSTEMS. Question Bank:

Database Concepts II. Top down V Bottom up database design. database design (Cont) 3/22/2010. Chapter 4

The process of database development. Logical model: relational DBMS. Relation

SQL Server. 1. What is RDBMS?

Relational Data Analysis I

Relational Database Design

Introduction to Database Systems. Normalization

Database Normalization. Mohua Sarkar, Ph.D Software Engineer California Pacific Medical Center

Schema Design and Normal Forms Sid Name Level Rating Wage Hours

Unit 3.1. Normalisation 1 - V Normalisation 1. Dr Gordon Russell, Napier University

If it's in the 2nd NF and there are no non-key fields that depend on attributes in the table other than the Primary Key.

normalisation Goals: Suppose we have a db scheme: is it good? define precise notions of the qualities of a relational database scheme

Week 11: Normal Forms. Logical Database Design. Normal Forms and Normalization. Examples of Redundancy

THE BCS PROFESSIONAL EXAMINATION Diploma. October 2004 EXAMINERS REPORT. Database Systems

Database Design and Normal Forms

The class slides, your notes, and the sample problem that we worked in class may be helpful for reference.

Normalization. CIS 331: Introduction to Database Systems

LOGICAL DATABASE DESIGN

Normalisation 1. Chapter 4.1 V4.0. Napier University

RELATIONAL DATABASE DESIGN. Basic Concepts

How To Write A Diagram

Limitations of E-R Designs. Relational Normalization Theory. Redundancy and Other Problems. Redundancy. Anomalies. Example

Schema Refinement and Normalization

Relational Database Design Theory

Introduction to Computing. Lectured by: Dr. Pham Tran Vu

Chapter 7: Relational Database Design

KNOWLEDGE FACTORING USING NORMALIZATION THEORY

Lecture Notes on Database Normalization

Relational Database Design: FD s & BCNF

Database Constraints and Design

Determination of the normalization level of database schemas through equivalence classes of attributes


IT2305 Database Systems I (Compulsory)

Question 1. Relational Data Model [17 marks] Question 2. SQL and Relational Algebra [31 marks]

Higher National Unit specification: general information. Relational Database Management Systems

Why Is This Important? Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) Example (Contd.)

6.830 Lecture PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen

Database Management Systems. Redundancy and Other Problems. Redundancy

Introduction to Database Systems. Chapter 4 Normal Forms in the Relational Model. Chapter 4 Normal Forms

Transcription:

DATABASE NORMALIZATION Normalization: process of efficiently organizing data in the DB. RELATIONS (attributes grouped together) Accurate representation of data, relationships and constraints. Goal: - Eliminate redundant data in a DB. - Ensure data dependencies make sense. Guidelines for ensuring that DBs are normalized normal forms: 1NF, 2NF, 3NF, BCNF. Normalization: series of tests on a relation to determine whether it satisfies or violates the requirements of a normal form. Note: meet practical business requirements. Normalization: A technique for producing a set of relations with desirable properties, given the data requirements of an enterprise. Reason for normalization: to prevent possible corruption of DB stemming from update anomalies (insertion, deletion, modification).

FUNCTIONAL DEPENDENCIES Normalization: a formal method that identifies relations based on their primary key and the functional dependencies among their attributes. Constraint between attributes. Functional dependency: Describes the relationship between attributes in a relation. If A and B are attributes of a relation R, B is functionally dependent on A (den. A B), if

each value of A in R is associated with exactly one value of B in R. B is functionally A dependent on A B Determinant: attribute or set of attributes on the left hand side of the arrow. Identify the candidate key for a relation: recognise the attribute (group of attributes) that uniquely identifies each row in a relation. All of the attributes that are not part of the primary key (non-primary key attributes) should be functionally dependent on the key.

PROCESS OF NORMALIZATION Unnormalized form (UNF): A table that contains one or more repeating groups. Repeating group: an attribute or group of attributes within a table that occurs with multiple values for a single occurrence of the nominated key attributes of that table.

First normal form (1NF): A relation in which the intersection of each row and column contains one and only one value. UNF 1NF: remove repeating groups: Entering appropriate data in the empty columns of rows. Placing repeating data along with a copy of the original key attribute in a separate relation. Identifying a primary key for each of the new relations.

Full functional dependency: If A and B are attributes of a relation, B is fully functionally dependent on A if B is functionally dependent on A, but not any proper subset of A. A B is partially dependent if there is some attribute that can be removed from A and the dependency still holds.

Ex. Staff_No, SName Branch_No Staff_No Branch_No partial full Second normal form (2NF): A relation that is in 1NF and every non-primary key attribute is fully functionally dependent on the primary key. Note: applies to relations with composite keys (primary key composed of two or more attributes). A relation with a single attribute primary key is in at least 2NF. 1NF 2NF: remove partial dependencies: the functionally dependent attributes are removed from the relation by placing them in a new relation along with a copy of their determinant.

Transitive dependency: A condition where A, B and C are attributes of a relation such that if A B and B C, then C is transitively dependent on A via B (provided that A is not functionally dependent on B or C).

Third normal form (3NF): A relation that is in 1NF and 2NF, and in which no non-primary key attribute is transitively dependent on the primary key. 2NF 3NF: remove transitive dependencies: the transitively dependent attributes are removed from the relation by placing them in a new relation along with a copy of their determinant. The normalization process decomposes the original relation using a series of relation algebra projections. This result in a nonloss (lossless) decomposition, which is reversible using the natural join operation (primary key / foreign key mechanism).

Boyce-Codd Normal Form (BCNF): A relation is in BCNF if and only if every determinant is a candidate key. Notes: BCNF is a stronger form of 3NF BCNF => 3NF 3NF > BCNF

Violation of BCNF happen under specific conditions: A relation contains two (or more) composite candidate keys, which overlap and share at least one attribute in common. Transformation to BCNF: remove violating functional dependencies by placing them in a new relation.