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



Similar documents
Normalization. Normalization. Normalization. Data Redundancy

DBMS. Normalization. Module Title?

DATABASE NORMALIZATION

Lecture 2 Normalization

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

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

Normalization in Database Design

Database Design Methodologies

An Algorithmic Approach to Database Normalization

DATABASE DESIGN: Normalization Exercises & Answers

7.1 The Information system

Gamified Approach to Database Normalization

Normalization of Database

Fundamentals of Database System

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

Chapter 10. Functional Dependencies and Normalization for Relational Databases

Normalisation 6 TABLE OF CONTENTS LEARNING OUTCOMES

Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases

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

Functional Dependencies and Finding a Minimal Cover

Theory of Relational Database Design and Normalization

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

Introduction to normalization. Introduction to normalization

Functional Dependency and Normalization for Relational Databases

2. Basic Relational Data Model

Theory of Relational Database Design and Normalization

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

Chapter 10 Functional Dependencies and Normalization for Relational Databases

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

Chapter 9: Normalization

Normalisation 1. Chapter 4.1 V4.0. Napier University

SAMPLE FINAL EXAMINATION SPRING SESSION 2015

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

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

Schema Refinement, Functional Dependencies, Normalization

Relational Data Analysis I


From Spreadsheets to Relational Databases and Back

Database Management System

- Eliminating redundant data - Ensuring data dependencies makes sense. ie:- data is stored logically

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

Database Concepts. Database & Database Management System. Application examples. Application examples

IN THE WORKSHOP Tip #14

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

RDBNorma: - A semi-automated tool for relational database schema normalization up to third normal form.

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

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

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

Figure Sample 3GL COBOL Program

Database Design and Normalization

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

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

Normalization in OODB Design

ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati

Database IST400/600. Jian Qin. A collection of data? A computer system? Everything you collected for your group project?

C HAPTER 4 INTRODUCTION. Relational Databases FILE VS. DATABASES FILE VS. DATABASES

Relational Schema Design

MCQs~Databases~Relational Model and Normalization

DATABASE SYSTEMS. Chapter 7 Normalisation

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

Normal forms and normalization

Re-Design an Operational Database Author: Sovan Sinha (Business Intelligence Architect) May 4 th, 2009

>

Institutional Research Database Study

Normalisation to 3NF. Database Systems Lecture 11 Natasha Alechina

Configuring Data Masking

RELATIONAL DATABASE DESIGN. Basic Concepts

Database Design and Normalization

Quick Guide: Payroll tips

Graham Kemp (telephone , room 6475 EDIT) The examiner will visit the exam room at 15:00 and 17:00.

Investit Software Inc. ANALYZER RENTAL APARTMENT BUILDING EXAMPLE USA USA

Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Overview - detailed. Goal. Faloutsos CMU SCS

Normalisation. Why normalise? To improve (simplify) database design in order to. Avoid update problems Avoid redundancy Simplify update operations


Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES

KNOWLEDGE FACTORING USING NORMALIZATION THEORY

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.

Working With Direct Deposit Accounts and Your Payment Elections

Excel basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

Information Systems Analysis and Design CSC John Mylopoulos Database Design Information Systems Analysis and Design CSC340

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

1) After login WinTonenet Securities Trading System, a window named WinTonenet Securities Trading will be shown.

Part 6. Normalization

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file?

Database Design and Normal Forms

IT2305 Database Systems I (Compulsory)

INTERMEDIATE Excel 2013

How To Write A Diagram

LOGICAL DATABASE DESIGN

Create a PivotTable or PivotChart report

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

How To Connect Your Transactions To Quickbooks Online From Your Bank Or Credit Card Account On A Pc Or Mac Computer Or Ipa Device

Tutorial 3. Maintaining and Querying a Database

Microsoft Office 2010

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

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

The Relational Data Model and Relational Database Constraints

Instructions for creating a data entry form in Microsoft Excel

Normalization. CIS 331: Introduction to Database Systems

Microsoft Excel 2010 Part 3: Advanced Excel

Transcription:

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

Purpose of Normalization Normalization is a technique for producing a set of suitable relations that support the data requirements of an enterprise. 2

Purpose of Normalization Characteristics of a suitable set of relations include: the minimal number of attributes necessary to support the data requirements of the enterprise; attributes with a close logical relationship are found in the same relation; minimal redundancy with each attribute represented only once with the important exception of attributes that form all or part of foreign keys. 3

Purpose of Normalization The benefits of using a database that has a suitable set of relations is that the database will be: easier for the user to access and maintain the data; take up minimal storage space on the computer. 4

How Normalization Supports Database Design 5

Data Redundancy and Update Anomalies Redundant data 6

Data Redundancy and Update Anomalies StaffBranch relation has redundant data the details of a branch are repeated for every member of staff. In contrast, the branch information appears only once for each branch in the Branch relation and only the branch number (branchno) is repeated in the Staff relation, to represent where each member of staff is located. 7

Data Redundancy and Update Anomalies Relations that contain redundant information may potentially suffer from update anomalies. Types of update anomalies include Insertion e.g. insert new staff B007, 22 Deer Road, London? Deletion e.g. delete staff SA9 (branch info of B007 is lost) Modification e.g. change address of B003 (must update all staffs in this location) 8

Functional Dependencies Functional dependency describes relationship between attributes. For example, if A and B are attributes of relation R, B is functionally dependent on A (denoted A B), if each value of A in R is associated with exactly one value of B in R. e.g. staffno branchno (in staffbranch) 9

Characteristics of Functional Dependencies Diagrammatic representation. The determinant of a functional dependency refers to the attribute or group of attributes on the left-hand side of the arrow. 10

An Example Functional Dependency A -> B OK A -> B C -> B OK A->B A->C NO 11

Full/Partial Functional Dependency Partial functional dependency staffno, sname branchno Since some attributes can be removed (sname) Full functional dependency staffno branchno No attributes can be removed 12

Transitive Dependencies Transitive dependency describes 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). if A B and B C, then A C 13

Example Transitive Dependency Consider functional dependencies in the StaffBranch relation staffno (A) sname, position, salary, branchno(b), baddress(c) branchno (B) baddress (C) if A B and B C, then A C Transitive dependency, branchno (B) baddress (C) exists on staffno via branchno. 14

Example - Using sample data to identify functional dependencies. 15

Example - Using sample data to identify functional dependencies. Function dependencies between attributes A to E in the Sample relation. A C (fd1) C A (fd2) B D (fd3) A, B E (fd4) 16

Example - Identifying Primary Key for Sample Relation The determinants in the Sample relation are A, B, C, and (A, B). However, the only determinant that functionally determines all the other attributes of the relation is (A, B). (A, B) is identified as the primary key for this relation. 17

The Process of Normalization 18

Data Sources Collection of DreamHome leases 19

Unnormalized Form (UNF) A table that contains one or more repeating groups. To create an unnormalized table Transform the data from the information source (e.g. form) into table format with columns and rows. 20

Unnormalized Form (UNF) 21

First Normal Form (1NF) A relation in which the intersection of each row and column contains one and only one value. Repeating group (propertyno, paddress, rentstart, rentfinish, rent, ownerno, oname) 22

First Normal Form (1NF) Remove repeated groups 23

Second Normal Form (2NF) A relation that is in 1NF and every nonprimary-key attribute is fully functionally dependent on the primary key. fd2 clientno -> cname fd3 propertyno -> paddress, rent, ownerno, oname 24

Second Normal Form (2NF) Remove partial dependencies 25

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. fd6 ownerno -> oname 26

Third Normal Form (3NF) Remove transitive dependencies 27

Third Normal Form (3NF) In summary 28