Docsity

Splitting Tables, Pre joining - Data Warehousing - Lecture Slides, Slides of Data Warehousing

Partial preview of the text

Download Splitting Tables, Pre joining - Data Warehousing - Lecture Slides and more Slides Data Warehousing in PDF only on Docsity!

1

Data Warehousing

Lecture-

De-normalization Techniques

2

De-normalization Techniques

4

Splitting Tables: Horizontal splitting…

Breaks a table into multiple tables based upon

common column values. Example: Campus

specific queries.

GOAL

 Spreading rows for exploiting parallelism.

 Grouping data to avoid unnecessary query load

in WHERE clause.

5

Splitting Tables: Horizontal splitting

ADVANTAGE

 Enhance security of data.

 Organizing tables differently for different

queries.

 Graceful degradation of database in case of

table damage.

 Fewer rows result in flatter B-trees and fast data

retrieval.

7

Pre-joining …

 Identify frequent joins and append the tables together in the physical data model.  Generally used for 1:M such as master- detail. RI is assumed to exist.  Additional space is required as the master information is repeated in the new header table.

8

Pre-Joining…

normalized^ Tx_ID^ Sale_ID^ Item_ID^ Item_Qty^ Sale_Rs Tx_ID Sale_ID Sale_date Sale_personItem_ID Item_Qty Sale_Rs denormalized Sale_ID Sale_date Sale_person Master Detail 1 M

10

Adding Redundant Columns…

ColA ColB Table_ ColA ColC ColD … ColZ Table_ ColA ColB Table_1’ ColA ColC ColD … ColZ Table_ ColC

11

Adding Redundant Columns…

Columns can also be moved, instead of making them

redundant. Very similar to pre-joining as discussed

earlier.

EXAMPLE

Frequent referencing of code in one table and

corresponding description in another table.

 A join is required.

 To eliminate the join, a redundant attribute added in

the target entity which is functionally independent of

the primary key.

13

Derived Attributes: Example

Age is also a derived attribute, calculated as Current_Date
  • DoB (calculated periodically).
GP (Grade Point) column in the data warehouse data
model is included as a derived value. The formula for
calculating this field is Grade*Credits.
#SID
DoB
Degree
Course
Grade
Credits
Business Data Model
#SID
DoB
Degree
Course
Grade
Credits
GP
Age
DWH Data Model
Derived attributes
 Calculated once
 Used Frequently
DoB: Date of Birth