Week 06 - Normalisation INFOSYS 222.

Slides:



Advertisements
Similar presentations
Chapter 5 Normalization of Database Tables
Advertisements

5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Normalization Normalization We discuss four normal forms: first, second, third, and Boyce-Codd normal forms 1NF, 2NF, 3NF, and BCNF Normalization.
Chapter 5 Normalization of Database Tables
Normalization of Database Tables Special adaptation for INFS-3200
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
NORMALIZATION N. HARIKA (CSC).
Introduction to Schema Refinement. Different problems may arise when converting a relation into standard form They are Data redundancy Update Anomalies.
Week 6 Lecture Normalization
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
Chapter 7 1 Database Principles Data Normalization Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that.
Database Design – Lecture 8
Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management Peter Rob & Carlos Coronel.
Normalization of Database Tables
Chapter 4 Normalization of Database Tables. 2 Database Tables and Normalization Table is basic building block in database design Table is basic building.
Normalization MIS335 Database Systems. Why Normalization? Optimizing database structure Removing duplications Accelerating the instructions Data integrity!
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
Lecture # 16 Chapter # 10 Normalization Database Systems.
Chapter 5: Relational Database Design
Databases – Exam questions
Normalization (Chapter 2)
SEEM3430: Information Systems Analysis and Design
CS 3630 Database Design and Implementation
Chapter 4: Relational Database Design
Payroll Management System
Introduction to MS Access: creating tables, keys, and relationships
Lecture # 13 (After 1st Exam)
CHAPTER 5 Normalization Of Database Tables (Part II: The Process)
Normalization 2NF & 3NF Presented by: Dr. Samir Tartir
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Entity relationship diagrams
Normalization There is a sequence to normal forms:
Database Normalization
System Analysis and Design
Schema Refinement What and why
CS 3630 Database Design and Implementation
Normalization A337.
בסיסי נתונים - מצגת ההרצאה - 1.
Table Normal Forms.
Chapter 4.1 V3.0 Napier University Dr Gordon Russell
ITS232 Introduction To Database Management Systems
Normalization Normalization
CS 3630 Database Design and Implementation
Normalization of Database Tables Uploaded by: mysoftbooks.ml
Databases & Consistency
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Chapter 14 Normalization.
Lesson Objectives Aims You should know about: 1.3.2:
國立臺北科技大學 課程:資料庫系統 2015 fall Chapter 14 Normalization.
Database Normalisation
Normalization of DB relations examples Fall 2015
Sampath Jayarathna Cal Poly Pomona
Sampath Jayarathna Cal Poly Pomona
DATABASE DESIGN & DEVELOPMENT
NORMALIZATION FIRST NORMAL FORM (1NF):
Database Normalization.
Database Design Theory CS405G: Introduction to Database Systems
Review of Week 3 Relation Transforming ERD into Relations
Database.
Database Normalization
Normalisation 1 Unit 3.1 Dr Gordon Russell, Napier University
Normalisation Un-normalised Data (UNF or 0NF) Data Attributes:
Presentation transcript:

Week 06 - Normalisation INFOSYS 222

Agenda Agenda Normalisation and normal forms 1NF, 2NF and 3NF Practice on normalisation with previous exam questions

Normalisation What is normalisation? What are 1NF, 2NF and 3NF? Why do we need normalisation? What would we achieve at the end of normalisation? What are 1NF, 2NF and 3NF? What are functional dependencies? What are partial functional dependencies? What are transitive functional dependencies

Normalisation Normalisation is a process that “improves” a database design by generating relations that are of higher normal forms. The objective of normalisation: “to create relations where every dependency is on the key, the whole key, and nothing but the key”. Minimize information duplication

Work Allocation Chart emp_No emp_Name rank_Id rank_Desc salary project_No project_Desc project_Start_Date 123 John 01 Sr.Engr 52K ABC34 Waste disposal 01/03/15 456 Alan 03 App. Spec 35K QXN88 Sludge treatment 20/06/15 555 Peter 02 Engr 40K 12/03/15 467 Jane BAT20 N2O Generation 09/05/15 15/06/15 03/05/15 Show how to write 1NF

Functional dependencies We say an attribute, B, has a functional dependency on another attribute, A, if for any two records, which have the same value for A, then the values for B in these two records must be the same. We illustrate this as: A  B Example: We only track one name for each employee. Suppose each employee is identified by their unique employee number. We say there is a functional dependency of name on employee number: employee number  employee name

Functional dependencies If emp_No is the PK then the FDs: emp_No  emp_Name emp_No  rank_Desc emp_No  salary must exist. emp_No is not the PK : A row is not unique emp_No and project_No : is unique Show 1NF with keys underlined

Partial dependency A partial dependency exists when an attribute B is functionally dependent on an attribute A, and A is a component of a multipart candidate key. emp_No project_No project_StartDate project_Desc Candidate keys: {emp_No, project_No} project_Desc is partially dependent on {emp_No, project_No} as project_No is a determinant of project_Desc and project_No is part of a candidate key Show that partial dependencies are removed to a separate relation Relations in 2NF

Transitive dependency Consider attributes A, B, and C, and where A  B and B  C. Functional dependencies are transitive, which means that we also have the functional dependency A  C We say that C is transitively dependent on A through B. For non key attributes

Transitive dependency emp_No  rank_Id emp_No emp_Name rank_Id rank_Desc rank_Id  rank_Desc emp_No emp_Name rank_Id rank_Desc Remove all transitive dependent attributes together with their determinant to a new relation Show 3NF relations rank_Desc is transitively dependent on emp_No via rank_Id emp_No  rank_Desc

INFOSYS 222 AC 2007 Exam 101 Derive a set of relation in 3NF. Show each step of normalisation clearly. All PKs should have a solid underline and FKs a dashed line. Draw an ERD for the derived relations

INFOSYS 222 AC 2016 Exam

INFOSYS 222 AC 2016 Exam Derive a set of relations in third normal form (3NF), using the data shown in figure above Clearly show each step of normalisation – 1NF, 2NF and 3NF