Normalisation Rules and Practical Application Geoff Leese January 2010.

Slides:



Advertisements
Similar presentations
Chapter Three Objectives Identification of Keys Application of primary and foreign keys Converting a database design to Relational DB. What is a good DBMS.
Advertisements

RJP/RDA 1 /93 Relational Data Analysis (RDA) RDA organises all the system’s data items into a set of well NORMALISED relations. These should avoid: 1.
Normalization Lite Pepper. Golden Rule Every attribute must depend upon the key, --- > 1NF the whole key, --- > 2NF and nothing but the key. -  3NF and.
Relational Database Appendix
Normalisation Ensuring data integrity in database design 1.
Modeling the Data: Conceptual and Logical Data Modeling
Monash University Week 7 Data Modelling Relational Database Theory IMS1907 Database Systems.
Jump to first page Normalization Jump to first page Topics n Why normalization is needed n What causes anomalies n What the 4 normal forms are n How.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Normalisation “A formal technique for analysing relations based on their primary key and functional dependencies.” [Codd]. Process – Analyse each relation.
© 2005 by Prentice Hall Chapter 3a Database Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Modern Systems Analysis and Design Third Edition
Project and Data Management Software
LOGICAL DATABASE DESIGN
10-1 Chapter 10 Designing Databases Modern Systems Analysis and Design Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Database Design Concepts
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Chapter 4: Logical Database Design and the Relational Model (Part II)
1 Class Agenda (04/09 through 04/16)  Review HW #8  Present normalization process Enhance conceptual knowledge of database design. Improve practical.
Functional Dependence An attribute A is functionally dependent on attribute(s) B if: given a value b for B there is one and only one corresponding value.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 2 Slide 1 Chapter 10 Designing Databases.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Concepts and Terminology Introduction to Database.
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
Module Title? DBMS Normalization. Module Title? DBMS Normalization  Normalization is the process of removing redundant data from tables in order to improve.
A Normalisation Example Mark Kelly McKinnon Secondary College Vceit.com Based on work by Robert Timmer-Arends.
Lecture 12 Designing Databases 12.1 COSC4406: Software Engineering.
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
10/3/2012ISC329 Isabelle Bichindaritz1 Logical Design.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
CORE 2: Information systems and Databases NORMALISING DATABASES.
1 Information Retrieval and Use Data Analysis & Data Modeling, Relational Data Analysis and Logical Data Modeling Geoff Leese September 2009.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
IE 423 – Design of Decision Support Systems Data modeling and database development.
Unit 4 Object Relational Modeling. Key Concepts Object-Relational Modeling outcomes and process Relational data model Normalization Anomalies Functional.
11/07/2003Akbar Mokhtarani (LBNL)1 Normalization of Relational Tables Akbar Mokhtarani LBNL (HENPC group) November 7, 2003.
1 Transforming the Data Model into Relations (Tables) and Normalisation Students.
Creating Databases Data normalization. Integrity and Robustness. Work session. Homework: Prepare short presentation on enhancement projects. Continue working.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 9 Designing Databases.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
Database Design Chapter 9 Part-2: Normalization 1.
Logical Database Design and the Relational Model.
IE 423 – Design of Decision Support Systems Data modeling and database development.
8-1 © Prentice Hall, 2007 Chapter 8: Object-Relational Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Lecture 4: Logical Database Design and the Relational Model 1.
Logical Design 12/10/2009GAK1. Learning Objectives How to remove features from a local conceptual model that are not compatible with the relational model.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
IMS 4212: Normalization 1 Dr. Lawrence West, Management Dept., University of Central Florida Normalization—Topics Functional Dependency.
Logical Database Design and Relational Data Model Muhammad Nasir
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 12 Designing.
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.
Flat file and relational databases Flat file database In a flat file database information is held in a single table. Student IDStudent name GenderDOBCourse.
SEEM3430: Information Systems Analysis and Design
Normalization Karolina muszyńska
Chapter 5: Logical Database Design and the Relational Model
MIS 322 – Enterprise Business Process Analysis
Modern Systems Analysis and Design Third Edition
Chapter 9 Designing Databases
Relational Model and ER Model: in a Nutshell
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Relational Database.
Chapter 9 Designing Databases
Chapter 12 Designing Databases
Chapter 10 Designing Databases
Presentation transcript:

Normalisation Rules and Practical Application Geoff Leese January 2010

Normalisation and Rules of Normalisation Normalisation: the process of converting complex data structures into simple, stable data structures. First Normal From (1NF) – Unique rows, no multivalued attributes. – All relations are in 1NF. Second Normal Form (2NF) Each nonprimary key attribute is identified by the whole key (called full functional dependency). Third Normal Form (3NF) – Nonprimary key attributes do not depend on each other (i.e. no transitive dependencies). The result of normalisation is that every nonprimary key attribute depends upon the whole primary key.

Functional Dependencies and Primary Keys Functional Dependency – A particular relationship between two attributes. – For a given relation, attribute B is functionally dependent on attribute A if, for every valid value of A, that value of A uniquely determines the value of B. – The functional dependence of B on A is represented by A→B.

Functional Dependencies and Primary Keys (Cont.) Functional dependency is not a mathematical dependency. Instances (or sample data) in a relation do not prove the existence of a functional dependency. Knowledge of problem domain is most reliable method for identifying functional dependency.

Second Normal Form (2NF) A relation is in second normal form (2NF) if any of the following conditions apply: – Every non-primary key attribute is functionally dependent on the full set of primary key attributes. To convert a relation into 2NF, you decompose the relation into new relations using the attributes, called determinants, that determine other attributes. The determinants are the primary key of the new relation.

Third Normal Form (3NF) A relation is in third normal form (3NF) if it is in second normal form (2NF) and there are no functional (transitive) dependencies between two (or more) nonprimary key attributes.

Third Normal Form (3NF) (Cont.) Foreign Key: an attribute that appears as a non- primary key attribute in one relation and as a primary key attribute (or part of a primary key) in another relation. Referential Integrity: an integrity constraint specifying that the value (or existence) of an attribute in one relation depends on the value (or existence) of the same attribute in another relation.

Example stage one Student entity Student_id (primary key) Student_name Student_address Student_phone_no Student_ _address Student_course_code_one Student_course_title_one Student_course_location_one Student_course_leader_id one Student_course_leader_name_one Student_course_leader_ _one Student_course_code_two Student_course_title_two Student_course_location_two Student_course_leader_id two Student_course_leader_name_two Student_course_leader_ _two Where are the problems?

Example stage two Student entity Student_id (primary key) Student_surname Student_firstname Student_address_house and street Student_address_district Student_address_town Student_address_city Student_address_postcode Student_phone_no Student_ _address Course entity Student_address Student_phone_no Student_ _address Course_code Course_title Course_location Course_leader_id Course_leader_first_name Course_leader_surname Course_leader_ First Normal Form – repeating group removed to form a new entity, multi-valued attributes decomposed. Second normal form?

Example stage three Student entity Student_id (primary key) Student_surname Student_firstname Student_address_house and street Student_address_district Student_address_town Student_address_city Student_address_postcode Student_phone_no Student_ _address Course entity Course_code (primary key) Course_title Course_location Second Normal Form – “Course leader” set of attributes removed to form a new entity as they don’t depend on the course ID. Third normal form? Relationships? Course_Leader entity Course_ Leader_id Course_leader_first_name Course_leader_surname Course_leader_

The completed ERD (LDS in SELECT SSADM language!) I’m not sure about the “address” set of attributes – are you?

Further reading Hoffer5e_CH10.ppt - Week Hoffer5e_CH10.ppt - Week 20 Hoffer et al (2008), Modern Systems Analysis and Design (5 th edition) pages LCY LCY – Accent grates a bit, but otherwise OK!