April 20022CS3X1 Database Design Normalisation (1) John Wordsworth Department of Computer Science The University of Reading Room.

Slides:



Advertisements
Similar presentations
Functional dependencies 1. 2 Outline motivation: update anomalies cause: not expressed constraints on data (FDs) functional dependencies (FDs) definitions.
Advertisements

Database Design: Normalization
Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina.
Boyce-Codd NF Takahiko Saito Spring 2005 CS 157A.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Boyce-Codd Normal Form Kelvin Nishikawa SE157a-03 Fall 2006 Kelvin Nishikawa SE157a-03 Fall 2006.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design: Normalization.
4 Chapter 4 Normalization Hachim Haddouti. 4 Hachim Haddouti, CH4, see also Rob & Coronel 2 In this chapter, you will learn: What normalization is and.
Normalization I.
Normalization A337. A337 - Reed Smith2 Structure What is a database? ◦ Tables of information  Rows are referred to as records  Columns are referred.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
1 5 Concepts of Database Management, 4 th Edition, Pratt & Adamski Chapter 5 Database Design 1: Normalization.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
Chapter 5 Normalization of Database Tables
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 3 Objectives: Identifying and Eliminating Database.
Lecture 12 Inst: Haya Sammaneh
Avoiding Database Anomalies
Normalization. 2 Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification of various types of update anomalies.
NormalizationNormalization Chapter 4. Purpose of Normalization Normalization  A technique for producing a set of relations with desirable properties,
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
Concepts of Database Management, Fifth Edition
Normalization. Learners Support Publications 2 Objectives u The purpose of normalization. u The problems associated with redundant data.
1 Pertemuan 23 Normalisasi Matakuliah: >/ > Tahun: > Versi: >
Bottom Up Analysis Bottom-up Data Analysis An Example.
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
Your name here. Improving Schemas and Normalization What are redundancies and anomalies? What are functional dependencies and how are they related to.
資料庫正規化 Database Normalization 取材自 AIS, 6 th edition By Gelinas et al.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
Normalization Transparencies
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
CORE 2: Information systems and Databases NORMALISING DATABASES.
Lecture 5 Normalization. Objectives The purpose of normalization. How normalization can be used when designing a relational database. The potential problems.
Chapter 13 Normalization Transparencies Last Updated: 08 th May 2011 By M. Arief
Database Design – Lecture 8
IST 210 Normalization 2 Todd Bacastow IST 210. Normalization Methods Inspection Closure Functional dependencies are key.
Normalization Transparencies 1. ©Pearson Education 2009 Objectives How the technique of normalization is used in database design. How tables that contain.
In this session, you will learn to: Describe data redundancy Describe the first, second, and third normal forms Describe the Boyce-Codd Normal Form Appreciate.
© Pearson Education Limited, Normalization Bayu Adhi Tama, M.T.I. Faculty of Computer Science University of Sriwijaya.
9/23/2012ISC329 Isabelle Bichindaritz1 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,
Ahsan Abdullah 1 Data Warehousing Lecture-6Normalization Virtual University of Pakistan Ahsan Abdullah Assoc. Prof. & Head Center for Agro-Informatics.
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
April 20022CS3X1 Database Design The relational model John Wordsworth Department of Computer Science The University of Reading
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
Normalisation 1NF to 3NF Ashima Wadhwa. In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third.
April 2002Information Systems Design John Ogden & John Wordsworth FOI: 1 Database Design File organisations and indexes John Wordsworth Department of Computer.
April 20022/CS/3X EER 1 Database Design Enhanced entity-relationship modelling John Wordsworth Department of Computer Science The University of Reading.
April 2002Information Systems Design John Ogden & John Wordsworth SQL2: 1 Database Design SQL (2) John Wordsworth Department of Computer Science The University.
April 20022CS3X1 Database Design Entity-relationship modelling John Wordsworth Department of Computer Science The University of Reading
April 20022CS3X1 Database Design Relational algebra John Wordsworth Department of Computer Science The University of Reading Room.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
Normalization ACSC 425 Database Management Systems.
ITD1312 Database Principles Chapter 4C: Normalization.
Database Architecture Normalization. Purpose of Normalization A technique for producing a set of relations with desirable properties, given the data requirements.
NORMALIZATION Handout - 4 DBMS. What is Normalization? The process of grouping data elements into tables in a way that simplifies retrieval, reduces data.
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
April 20022/CS/3X1 Database Design Design method John Wordsworth Department of Computer Science The University of Reading Room.
Normalization.
A brief summary of database normalization
Functional Dependencies
Chapter 4 Relational Databases
Database Normalization
Normalization A337.
Normalization Dale-Marie Wilson, Ph.D..
Normalisation to 3NF.
Review of Week 3 Relation Transforming ERD into Relations
Database Design Normalisation (2)
Presentation transcript:

April 20022CS3X1 Database Design Normalisation (1) John Wordsworth Department of Computer Science The University of Reading Room 129, Ext 6544

April 20022CS3X2 Lecture objectives Explain the benefits of normalisation. Describe and recognise common anomalies in table designs. Explain the concept of functional dependency among attributes in a table. Describe the characteristics of tables in 1NF and 2NF. Perform normalisation to 2NF.

April 20022CS3X3 Why normalise? To control the degree of redundancy in a database design –control, not necessarily eliminate To ensure that all information has an independent place in the database schema –eliminate anomalies of various kinds

April 20022CS3X4 Anomalies Delete anomaly –delete last tutee of JAO, no way of retaining JAO in table Insertion anomaly –new student; can’t insert record for new student unless tutor already exists Update anomaly –change of LPhone; all records must be altered

April 20022CS3X5 Repeating groups This table contains a “repeating group”: the columns SName, SHall, SDegree. It is the attributes that repeat, not their values. This table has two rows; each cell in the R/H 3 columns has a composite value.

April 20022CS3X6 First normal form (1NF) In first normal form every cell in the table has one and only one value. Transform to 1NF by eliminating repeating groups What is a suitable primary key for this relation?

April 20022CS3X7 Another 1NF table

April 20022CS3X8 Consider two attributes A, B in a relation, R The value of A determines the value of B –for each value of A there is one and only one value of B –A  B; (  A determines B); (  B is FD on A) –A is said to be a determinant E.g. A  UNIT CODE; B  UNIT TITLE –Note: may be two different units with the same title –A  B does not imply B  A Functional dependency

April 20022CS3X9 Dependency diagram LName SName LPhone SDegree SHall UCode UTitle Primary Key

April 20022CS3X10 Full and partial dependency Note that although the primary key is composite, some attributes are functionally dependent on only part of it. E.g. LName is FD on SName This is called partial dependency. In second normal form we eliminate partial dependencies.

April 20022CS3X11 Second normal form (2NF) LName SName LPhone SDegree SHall UCode UTitle Primary Key Registration (SName, UCode); Unit (UCode, UTitle); Student (SName, LName, LPhone, SDegree, SHall)

April 20022CS3X12 The 2NF relations Registration Units  

April 20022CS3X13 The 2NF relations (contd.) Student 

April 20022CS3X14 Key points Normalisation is an operation on a table to remove anomalies. Tables can exhibit functional dependencies between attributes. Tables in 1NF have no repeating groups. Tables in 2NF have no partial dependencies.