Optimization Strategy

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 21

CT004-3.

5-3 Advanced Database Systems Optimization Strategy

CT004-3-3 ADVBS

Introduction & Overview

Objectives

Meaning of denormalization. When to denormalize to improve performance.

CT004-3-3 ADVBS

Introduction & Overview

Introduction

Result of normalization is a design that is structurally consistent with minimal redundancy. However, sometimes a normalized database does not provide maximum processing efficiency. May be necessary to accept loss of some benefits of a fully normalized design in favor of performance.
Introduction & Overview

CT004-3-3 ADVBS

Introduction

Also consider that denormalization:

makes implementation more complex often sacrifices flexibility may speed up retrievals but it slows down updates

CT004-3-3 ADVBS

Introduction & Overview

What is Denormalization

Denormalization refers to Refinement to relational schema Degree of normalization for a modified relation is less than the degree of at least one of the original relations.

Term used more loosely to refer to Situations where two relations are combined into one new relation New relation is still normalized but contains more nulls than original relations.
Introduction & Overview

CT004-3-3 ADVBS

When to apply denormalization

Consider denormalization in following situations, specifically to speed up frequent or critical transactions:


Combining 1:1 relationships Duplicating non-key attributes in 1:* relationships to reduce joins

Duplicating foreign key attributes in 1:* relationships to reduce joins

CT004-3-3 ADVBS

Introducing repeating groups


Introduction & Overview

Sample Relation Diagram

CT004-3-3 ADVBS

Introduction & Overview

Sample Relations

CT004-3-3 ADVBS

Introduction & Overview

Combining 1:1 relationships

CT004-3-3 ADVBS

Introduction & Overview

Combining 1:1 relationships

CT004-3-3 ADVBS

Introduction & Overview

Duplicating non-key attributes in 1:* relationships to reduce joins

SELECT p.*, o.lName FROM PropertyForRent p, PrivateOwner o WHERE p.ownerNo = o.ownerNo AND branchNo = B003;

CT004-3-3 ADVBS

Introduction & Overview

Duplicating non-key attributes in 1:* relationships to reduce joins

SELECT p.* FROM PropertyForRent p WHERE branchNo = B003;

CT004-3-3 ADVBS

Introduction & Overview

Duplicating non-key attributes in 1:* relationships: Lookup Table

CT004-3-3 ADVBS

Introduction & Overview

Duplicating non-key attributes in 1:* relationships: Lookup Table

CT004-3-3 ADVBS

Introduction & Overview

Duplicating FK attributes in 1:* relationship to reduce joins

CT004-3-3 ADVBS

Introduction & Overview

Duplicating FK attributes in 1:* relationship to reduce joins

CT004-3-3 ADVBS

Introduction & Overview

Introducing repeating groups

CT004-3-3 ADVBS

Introduction & Overview

Partitioning relations

Rather than combining relations together, alternative approach is to decompose them into a number of smaller and more manageable partitions. Two main types of partitioning: horizontal and vertical.

CT004-3-3 ADVBS

Introduction & Overview

Partitioning relations

CT004-3-3 ADVBS

Introduction & Overview

Advantages and disadvantages of denormalization

CT004-3-3 ADVBS

Introduction & Overview

Q&A

CT004-3-3 ADVBS

Introduction & Overview

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy