Database solutions The process of normalization Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology rooms:

Slides:



Advertisements
Similar presentations
5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Advertisements

Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina.
1/22/20091 Study the methods of first, second, third, Boyce-Codd, fourth and fifth normal form for relational database design, in order to eliminate data.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Normalization I.
Chapter 5 Normalization Transparencies © Pearson Education Limited 1995, 2005.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
1 Minggu 10, Pertemuan 19 Normalization (cont.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Normalization II. Boyce–Codd Normal Form (BCNF) Based on functional dependencies that take into account all candidate keys in a relation, however BCNF.
Chapter 14 Advanced Normalization Transparencies © Pearson Education Limited 1995, 2005.
Introduction to Schema Refinement
Lecture 12 Inst: Haya Sammaneh
Normalization. 2 Objectives u Purpose of normalization. u Problems associated with redundant data. u Identification of various types of update anomalies.
The Relational Model and Normalization R. Nakatsu.
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: >
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
SALINI SUDESH. Primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of.
Normalization Transparencies
CSC271 Database Systems Lecture # 28.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
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
Chapter 10 Normalization Pearson Education © 2009.
Chapter 13 Normalization Transparencies. 2 Chapter 13 - Objectives u How to undertake process of normalization. u How to identify most commonly used normal.
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
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,
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
Chapter 8 Relational Database Design Topic 1: Normalization Chuan Li 1 © Pearson Education Limited 1995, 2005.
4TH NORMAL FORM By: Karen McVay.
Normalization.
Understanding Data Storage
Normalization (Database Design)
Advanced Normalization
Normalization Karolina muszyńska
Announcements Read 5.1 – 5.5 for today Read 5.6 – 5.7 for Wednesday
CS 3630 Database Design and Implementation
Normalization DBMS.
A brief summary of database normalization
Normalization Dongsheng Lu Feb 21, 2003.
Chapter 5: Logical Database Design and the Relational Model
Database Design Dr. M.E. Fayad, Professor
Relational Database Design by Dr. S. Sridhar, Ph. D
Advanced Normalization
Normalization Referential Integrity
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Normalization.
Database Normalization
Chapter 6 Normalization of Database Tables
Module 5: Overview of Normalization
Normalization By Jason Park Fall 2005 CS157A.
Normalization Boyce-Codd Normal Form Presented by: Dr. Samir Tartir
Chapter 14 & Chapter 15 Normalization Pearson Education © 2009.
Normalization.
Normalization Dongsheng Lu Feb 21, 2003.
Chapter 7 Normalization Chapter 13 in Textbook.
Table Normal Forms.
Normalization Dale-Marie Wilson, Ph.D..
Multivalued Dependencies & Fourth Normal Form
Multivalued Dependencies & Fourth Normal Form
Normalization.
Normalization Normalization theory is based on the observation that relations with certain properties are more effective in inserting, updating and deleting.
Chapter 14 Normalization.
Normalization February 28, 2019 DB:Normalization.
國立臺北科技大學 課程:資料庫系統 2015 fall Chapter 14 Normalization.
Normalization By Jason Park Fall 2005 CS157A.
Database Design Dr. M.E. Fayad, Professor
Chapter 7a: Overview of Database Design -- Normalization
Presentation transcript:

Database solutions The process of normalization Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology rooms: 3.21 C, 15 C

The definition Normalization is the process of evaluation a table to determine whether it is in a specified normal form and, if necessary, the process in which the table is transformed (usually by decomposition) to tables in that specified normal form. 1 NF 2 NF 3 NF 4 NF 5 NF HNF HNF – Higher Normal Forms Functional dependency describes the relationship between attributes in a table. Atribute B is functionally dependent on A (A  B) if each value of A is associated with exactly one value of B. A is a determinant of B.

First Normal Form – 1NF A table is in first normal form if the intersection of each row and each column contains only one value from the domain of the column attribute. For a table to be in 1NF it is necessary to identyfiy and to remove repeating groups within the table. The repeating group is an atribute (or attributes) that contain more than one value for a single key occurrence. There are the following approaches of removing repeating groups: entering appropriate data in and additionally created row and duplicating the non-repeating data, where required (redundancy appears), moving data containing repeating groups along with a copy of the original key attribute into a separate table.

Repeating group Redundancy Transformation to 1 NF

Second Normal Form – 2NF A table is in second normal form if it is in first normal form and every non-primary-key attribute is fully functionally dependent on the primary key. Attribute B is fully functionally dependent on A if B is functionally dependent on A but not on any proper subset of A. If there is a proper subset on which B depends, there is a partial dependence between attributes. If the primary key of a table contains only a single attribute, the table is automatically in second normal form. Id_st = identifier of a student Id_st Surname Forename Field Note Subject A composite primary key Dependencies in the table Students_notes (under certain assumptions)

In order to obtain second normal form, partial dependencies have to be removed – this is done via table decomposition. Transformation to 2 NF

Third Normal Form - 3NF A table is in third normal form if it is in second normal form and it has no transitive dependencies on the primary key. Transitive dependency is a condition where A, B, C are attributes of a table, such that B is functionally dependent on A (A  B) and C is functionally dependent on B (B  C), and A is not functionally dependent on B or C. This is transitive dependency of A on C via B. Id_t= identifier of a teacher Id_t Surname Forename Chair Faculty Post Salary Primary key Dependencies in the table Academic_teachers (under certain assumptions)

In order to obtain third normal form, transitive dependencies have to be removed – this is done via table decomposition. Transformation to 3 NF

Boyce-Codd Normal Form – BCNR A table is in Boyce-Codd normal form if and only if every determinant is a candidate key. Two composite candidate keys exist in the given below table: K1 = {Id_s, Subject}  Id_t K2 = {Id_s, Id_t}  Subject One subject can be taught by more than one teacher. A teacher can teach only one subject. A student can attend many subjects. One functional dependency Id_t → Subject, i.e. Id_t is a determinant, but not a candidate key. Candidate key K2 Id_s = identifier of a student Id_t – identifier of a teacher Id_s Subject Id_t Candidate key K1

Transformation to BCNF

Fourth Normal Form 4NF A table is in fourth normal form if it is in third normal form and if it contains no trivial multi-valued dependencies. The dependency A  B is trivial if B is the subset of A. Otherwise it is a non-trivial dependency. Examples: trivial dependency: {Publication_year, Title}  {Title} non-trivial dependency :{Publication_year, Title}  {Edition}. Multi-valued dependency is such a dependency between attributes A, B, and C in a table, in which for each values of A there is a set of values for B (A  B), and a set of values for C (A  B), however, B and C are independent of each other, Id_s Subject Activity Id_s  Subject a student can participate in more than one subject Id_s  Additional a student can undertake more than one additional activity

Transformation to 4NF

Fifth Normal Form A table is in fifth normal form if it is in fourth normal form and if it has no join dependency, which means that there is no reunited decomposition of the table. Fifth normal form refers to a table that can be decomposed but cannot be reconstructed losslessly. Lossless-join (also called non-loss or non-additive) dependency is a property of a decomposition, which ensures that no spurious (nieprawidziwy, błędny) rows are generated when tables are reunited through a natural join operation.

No join dependency Possible basic decomposition of the table Shop_supply Natural join of T_12 and T_3 Results of natural join of each pair of decomposed tables