(C) Copyright Fabian Pascal

Slides:



Advertisements
Similar presentations
Database Tables and Normalization
Advertisements

Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Functional Dependencies and Normalization for Relational Databases.
Relational Databases Chapter 4.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter 5 Normalization of Database Tables
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Week 6 Lecture Normalization
DataBase Testing. Objectives What is DB Testing ? Testing at the Data Access Layer Scope of DB Testing Need for Testing DB Objects Common Problems that.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
Concepts and Terminology Introduction to Database.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Database Systems: Design, Implementation, and Management Tenth Edition
RDBMS Concepts/ Session 3 / 1 of 22 Objectives  In this lesson, you will learn to:  Describe data redundancy  Describe the first, second, and third.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 6 Normalization of Database Tables.
Chapter 7 Normalization. Outline Modification anomalies Functional dependencies Major normal forms Relationship independence Practical concerns.
Chapter 7 Normalization. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Modification anomalies Functional dependencies.
Database Management Systems Introduction. In the Beginning… Customer Program 1.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Functional Dependencies and Normalization for Relational Databases.
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.
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
9/23/2012ISC329 Isabelle Bichindaritz1 Normalization.
The Relational Database Model & The Database Development Process
Chapter 7 Functional Dependencies Copyright © 2004 Pearson Education, Inc.
Logical Database Design and the Relational Model.
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
1 CS 430 Database Theory Winter 2005 Lecture 7: Designing a Database Logical Level.
Dr. T. Y. Lin | SJSU | CS 157A | Fall 2015 Chapter 3 Database Normalization 1.
Lecture 4: Logical Database Design and the Relational Model 1.
Al-Imam University Girls Education Center Collage of Computer Science 1 st Semester, 1432/1433H Chapter 10_part 1 Functional Dependencies and Normalization.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
Fundamental of Database Systems
Logical Database Design and the Rational Model
Understanding Data Storage
A brief summary of database normalization
Chapter 5: Logical Database Design and the Relational Model
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
SQLSaturday Mountain View, March 15, 2014
Applied CyberInfrastructure Concepts Fall 2017
Quiz Questions Q.1 An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple.
Methodology – Physical Database Design for Relational Databases
Physical Database Design for Relational Databases Step 3 – Step 8
Chapter 4 Relational Databases
Database Normalization
DBM 380 HELP Education for Service-- dbm380help.com.
CMPE 226 Database Systems February 21 Class Meeting
Introduction lecture1.
Basic Concepts in Data Management
國立臺北科技大學 課程:資料庫系統 fall Chapter 18
Chapter 6 Normalization of Database Tables
IST 318 Database Administration
Normalization A337.
Database Management Systems
Database solutions Chosen aspects of the relational model Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology.
Normalization DB Design Guidelines Presented by: Dr. Samir Tartir
Normalization Normalization theory is based on the observation that relations with certain properties are more effective in inserting, updating and deleting.
Relational Database Design
Chapter 17 Designing Databases
DATABASE TECHNOLOGIES
Review of Week 3 Relation Transforming ERD into Relations
Database.
Presentation transcript:

(C) Copyright Fabian Pascal

DENORMALIZATION FOR PERFORMANCE A COSTLY ILLUSION SQLSaturday, Milan, October 2013 Fabian Pascal www.DBDebunk.com

(C) Copyright Fabian Pascal INDUSTRY SOP “A traditional normalized structure will not outperform a denormalized schema.” --Practitioner with 20 years experience “No major application will run in third normal form.” --G. Koch, ORACLE COMPLETE REFERENCE “Denormalization can be described a a process for reducing the degree of normalization with the aim of improving query processing performance.” --Sanders & Shin, University of NY Buffalo (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal THE ARGUMENT The higher the normal form, the more tables in the database; More tables  more joins; Join queries perform worse than single table queries; Denormalize for performance. (C) Copyright Fabian Pascal

NORMALIZATION DEGREES <1NF: Unnormalized 1NF: Normalized * 2NF-4NF: Further normalized 5NF: Fully normalized ** * R-tables; ** “Improved” R-tables; (6NF) (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal RULE OF THUMB 3NF R-tables are usually also in 5NF. It is not very often that 3NF R-tables are not fully normalized. * * Composite keys (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal BUSINESS MODEL Every employee is assigned to one or more projects; Every project has one or more employees assigned to it; Every employee is assigned to one or more activities; Every activity has one or more employees assigned to it; Project and activity assignments are independent; Business rules Employees-to-projects, employees-to-tasks (N:M) (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal LOGICAL MODEL (5NF) EMP_PROJ EMP_ACT Project assignment of employee identified by employee number (EMP#) is to project identified by project name (PROJNAME) Activity assignment of employee identified by employee number (EMP#) is to activity identified by activity name (ACTNAME) (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal “BUNDLING” (<4NF) Redundancy * Update anomalies INSERT: proj. of empl. assigned to no act DELETE: sole proj. of empl. Assined to multiple act. Database bias Harder to understand database Error proneness * Due to bundling (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal DESIGN OPTIONS Two 5NF R-tables: Domain Column Key * * FD, RI, Arb. One R-table: Domain Column Key Redundancy control! (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal RC CONSTRAINT a = b1 JOIN b2 (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal THE THEORY & … CREATE ASSERTION a_rd CHECK (SELECT * FROM a) = (SELECT * FROM b1) JOIN FROM b2); (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal … PRACTICE (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal DATA FUNDAMENTALS “IT professionals and users require databases and DBMS’s that produce correct results and are efficient, but most of them do not know whether the practices and tools they employ are sound and optimal what the real sources of problems are if they are not.” -- PRACTICAL ISSUES IN DATABASE MANAGEMENT (C) Copyright Fabian Pascal

MODEL & IMPLEMENTATION “Consider a mathematical principle, say: (a+b) x (a-b) = a² - b² If you are using a calculator that uses a method involving this principle and it is slow relative to other method, which would you blame, the method or the calculator?” -- A. Sen (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal BACKWARDS “Deferred to Design are the compromises between more tables to eliminate redundancy and and acceptable performance … But this normalization is not a concern as the [logical] model is built. Indeed, there is no realistic way of knowing whether the designer will chose to [further] normalize data and to what level.” -- Coad & Yourdon, OBJECT-ORIENTED ANALYSIS (C) Copyright Fabian Pascal

PRACTICAL IMPLICATIONS Full normalization Purely logical Neutral database Formal guide No update anomalies Max integrity Min constraints Denormalization Log-phys conf. Database bias Ad-hoc Update anomalies Max integrity risk RC constraints defeat purpose (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal RECOMMENDATIONS Learn data fundamentals * Don’t trust what you hear/read Don’t confuse Levels of representation Model with implementation Design logically sound databases Demand TRDBMS’s (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal EDUCATION SERVICES Education--distinct from tool-specific training--useful for any and all DBMS products used; Correct myths and misconceptions about Explain the practical implications of data fundamentals concepts, principles and methods that receive little, no, or incorrect coverage in the industry in simple, accessible language; Data professionals and users who interacts with databases and prefer to think for themselves understanding to "cookbooks" soundness to marketing fads and fashion; (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal SEMINARS & PAPERS Business Modeling for Database Design The Costly Illusion: Normalization, Integrity and Performance The Final NULL in the Coffin: A Relational Solution to Missing Data Truly Relational: What It Really Means (C) Copyright Fabian Pascal

(C) Copyright Fabian Pascal DBDEBUNK BLOG Debunkings of industry claims; Articles on data fundamentals; Weekly Quotes & To Laugh or Cry? Industry material for which it is difficult to know which of the two reactions is warranted; Illustrates the poor state of foundation knowledge; Offer opportunity to test oneself on knowledge and comprehension of data fundamentals; (C) Copyright Fabian Pascal