Decompositions - Data Base Management System - Lecture Slides, Slides of Database Management Systems (DBMS)

The key points in the lecture slides of the Data Base Management System are listed as:Decompositions, Relation Schema, Binary Decomposition, Subset of Attributes, Example Decomposition, Desirable Properties of Decompositions, Dependency Preserving, Functional Dependencies, Normalization

Typology: Slides

2012/2013

Uploaded on 05/06/2013

anuragini
anuragini 🇮🇳

4.4

(14)

134 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Decompositions
Given a relation schema R that is not in 3NF (or
perhaps BCNF) decomposition can be used to
help fix this problem
Decomposition replaces R with R1,...,RN where
1) attributes of Ri are a subset of the attributes of R
2) each attribute of R is in at least one Ri
Binary decomposition: R R1,R2
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Decompositions - Data Base Management System - Lecture Slides and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Decompositions

  • Given a relation schema R that is not in 3NF (or perhaps BCNF) decomposition can be used to help fix this problem
  • Decomposition replaces R with R1,...,RN where
      1. attributes of Ri are a subset of the attributes of R
      1. each attribute of R is in at least one Ri
  • Binary decomposition: R  R1,R

Example Decomposition

  • Hourly_Emps relation with attributes
    • (Ssn, name, rating, hourly wage, hours worked)
      • FD: rating  hourly wage
  • Hourly_Emps is not in 3NF (why?)
  • Decompose Hourly_Emps into
    • R1: (ssn, name, rating)
    • R2: (rating, hourly wage)
  • Key question: can we recover any legal row in Hourly_Emps from rows in R1 and R2?

Projections of Hourly_Emps

Example 1 of Lossy Decomposition

Example 2 of Lossy Decomposition

  • Hourly_Emps relation with attributes
    • (Ssn, name, rating, hourly wage, hours worked)
      • FD: rating  hourly wage
  • Decompose Hourly_Emps into
    • R1: (ssn, rating)
    • R2: (rating, name, hourly wage)
  • Why?

Normalization by Decomposition into BCNF

  • If R is not in BCNF, it is possible to obtain a lossless join decomposition into a collection of BCNF relation schmas
  • However, there may not by any dependency preserving decompositions into BCNF relations

Normalization by Decomposition into BCNF

  • Suppose that R is not in BCNF and XA be a FD that violates BCNF
  1. Decompose R into R-A and XA

  2. If either R-A or XA is not in BCNF, decompose further by recursive application

  • In general there may be alternate ways to normalize to BCNF. The theory does not help discriminate among these.

Summary of Database Design Theory

  • Constructing relation schemas is called DB design
  • Poor design can lead to insert, update and delete anomalies because of redundancy
  • Good design reduces redundancy by normalizing all relations to 3NF or BCNF
  • The theory of functional dependencies plays a major role in DB design