Database Management System

Slides:



Advertisements
Similar presentations
Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina.
Advertisements

Boyce-Codd NF Takahiko Saito Spring 2005 CS 157A.
Announcements Read 5.1 – 5.5 for today Read 5.6 – 5.7 for Wednesday Project Step 3, due Monday 10/18 Homework, due Friday 10/15 – by Research paper,
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.
Need for Normalization
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.
Normalization of Database Tables
DBSQL 4-1 Copyright © Genetic Computer School 2009 Chapter 4 Database Design.
Lecture 12 Inst: Haya Sammaneh
Chapter 5 The Relational Model and Normalization David M. Kroenke Database Processing © 2000 Prentice Hall.
Database Management COP4540, SCS, FIU Relation Normalization (Chapter 14)
Announcements Read 5.8 – 5.13 for Monday Project Step 3, due Monday 10/18 Homework 4, due Friday 10/15 – by (or turn in Monday in class)
Lecture 6 Normalization: Advanced forms. Objectives How inference rules can identify a set of all functional dependencies for a relation. How Inference.
Data Normalization Normal is not something to aspire to, it's something to get away from. ~ Jodie Foster ~
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
The Relational Model and Normalization The Relational Model Normalization First Through Fifth Normal Forms Domain/Key Normal Form The Synthesis of Relations.
Normalization Ioan Despi 2 The basic objective of logical modeling: to develop a “good” description of the data, its relationships and its constraints.
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
Database Management System. Normalization Normalization is the process of decomposing relations with anomalies to produce smaller, well structured relations.
Normalization. 2 u Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data,
Databases Illuminated Chapter 6 Normalization. Objectives of Normalization Develop a good description of the data, its relationships and constraints Produce.
Databases Illuminated
Normalisation 1NF to 3NF Ashima Wadhwa. In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third.
Copyright © Curt Hill Schema Refinement II 2 nd NF to 3 rd NF to BCNF.
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.
Decomposition and Normalization Fan Qi
SLIDE 1IS 257 – Fall 2006 Normalization Normalization theory is based on the observation that relations with certain properties are more effective.
Relational Data Model, Review Relation Tuple Attribute Domains Candidate key, primary key Key attribute, non-key attribute.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
Database Management System
COP 6726: New Directions in Database Systems
Perancangan Basis Data
Normalization (Database Design)
Advanced Normalization
Normalization Karolina muszyńska
Announcements Read 5.1 – 5.5 for today Read 5.6 – 5.7 for Wednesday
A brief summary of database normalization
Normalization First Normal Form (1NF) Boyce-Codd Normal Form (BCNF)
Normal Forms.
Database Design Dr. M.E. Fayad, Professor
Relational Database Design by Dr. S. Sridhar, Ph. D
Advanced Normalization
Normalization Refine data To attain a good DB design
Relational Design Theory
The Relational Model and Normalization
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Database Normalization
Chapter 6 Normalization of Database Tables
Module 5: Overview of Normalization
Database Management System
Distributed Database Management System
Database solutions The process of normalization Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology rooms:
Normalization.
Normalization Edited by: Nada Alhirabi.
Relational Design Theory
4 Normal Form.
Database Management System
Unit 7 Normalization (表格正規化).
Sampath Jayarathna Cal Poly Pomona
Sampath Jayarathna Cal Poly Pomona
Database Management System
Relational Database Design
Database Management System
Database Normalization.
Database Normalization.
Database Design Dr. M.E. Fayad, Professor
Database Design Normalisation (2)
Chapter 7a: Overview of Database Design -- Normalization
Presentation transcript:

Database Management System Lecture - 20 © Virtual University of Pakistan

© Virtual University of Pakistan Second Normal Form A relation is in 2nd normal form iff it is in the first normal form and all non key attributes are fully functionally dependent on key, that is, there is no partial dependency © Virtual University of Pakistan

© Virtual University of Pakistan Second Normal Form CLASS(crId, stId, stName, fId, room, grade) crId, stId  stName, fId, room, grade stId  stName crId  fId, room © Virtual University of Pakistan

© Virtual University of Pakistan Anomalies Redundancy Insertion Anomaly Deletion Anomaly Updation Aomaly © Virtual University of Pakistan

© Virtual University of Pakistan Anomalies crId stId stName fId room grade C3456 S1020 Suhail Dar F2345 104 B C5678 F4567 106 S1038 Shoaib Ali A S1015 Tahira Ejaz © Virtual University of Pakistan

© Virtual University of Pakistan Second Normal Form Relation is decomposed based on the FDs CLASS(crId, stId, stName, fId, room, grade) crId, stId  stName, fId, room, grade stId  stName crId  fId, room STD(stId, stName) COURSE(crId, fId, room) CLASS(crId, stId, grade) © Virtual University of Pakistan

© Virtual University of Pakistan Second Normal Form Each of these tables is in second normal form Free of anomalies due to partial dependency © Virtual University of Pakistan

© Virtual University of Pakistan Third Normal Form A table is in third normal form (3NF) iff it is in 2NF and there is no transitive dependency, that is, no non-key attribute is dependent on another non-key attribute © Virtual University of Pakistan

Transitive Dependency STD(stId, stName, stAdr, prName, prCrdts) stId  stName, stAdr, prName, prCrdts prName  prCrdts © Virtual University of Pakistan

© Virtual University of Pakistan Anomalies stId stName stAdr prName prCrdts S1020 Sohail Dar I-8 Islamabad MCS 64 S1038 Shoaib Ali G-6 Islamabad BCS 132 S1015 Tahira Ejaz L Rukh Wah S1018 Arif Zia E-8, Islamabad. BIT 134 © Virtual University of Pakistan

© Virtual University of Pakistan Third Normal Form STD(stId, stName, stAdr, prName, prCrdts) stId  stName, stAdr, prName, prCrdts prName  prCrdts STD (stId, stName, stAdr, prName) PROGRAM (prName, prCrdts) © Virtual University of Pakistan

© Virtual University of Pakistan 3NF Relations Each of the table is in 3NF Free of all anomalies © Virtual University of Pakistan

Boyce-Codd Normal Form A general form of 3NF Every relation in BCNF is in 3NF vice-versa is not always true 3NF is checked in steps, BCNF checked directly © Virtual University of Pakistan

© Virtual University of Pakistan BCNF A table is in BCNF if every determinant is a candidate key Situation when table in 3NF is not in BCNF A non-key determines a part of the composite primary key © Virtual University of Pakistan

© Virtual University of Pakistan BCNF FACULTY(fId, dept, office, rank, dateHired) fId, dept  office, rank, dateHired office  dept Table is in 3NF, not in BCNF since the office is not a candidate key Generates multiple overlapping candidate keys so we have fId, office  dept, rank, dateHired © Virtual University of Pakistan

© Virtual University of Pakistan BCNF We decompose the table again to bring it into BCNF FACULTY (fId, dept, office, rank, dateHired) FACULTY(fId, office, rank, dateHred) OFFICE(office, dept) © Virtual University of Pakistan

© Virtual University of Pakistan Higher Normal Forms After BCNF fourth, fifth and domain-key normal forms exist 4NF deals with multivalued dependency, fifth deals with possible lossless decompositions, DKNF reduces further chances of any possible inconsistency © Virtual University of Pakistan

Database Management System Lecture - 20 © Virtual University of Pakistan