04.06.2015 Views

Database Modeling and Design

Database Modeling and Design

Database Modeling and Design

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

166 CHAPTER 8 Business Intelligence<br />

Invoice Date<br />

Job Costing Daily Snapshot<br />

«fk» invoice date id<br />

widget quantity<br />

estimated hours<br />

estimated cost<br />

price<br />

actual hours<br />

actual cost<br />

Figure 8.12<br />

Schema for the job costing daily snapshot<br />

The schema for the job costing daily snapshot is shown in Figure 8.12.<br />

Notice that most of the dimensions used in the job-costing detail are not<br />

used in the snapshot. Summarizing the data has eliminated the need for<br />

most dimensions in this context. The daily snapshot contains one row<br />

for each day that jobs have been invoiced. The number of rows in the<br />

snapshot would be in the thous<strong>and</strong>s. The small size of the snapshot<br />

allows very quick response when a user requests the job costing daily<br />

snapshot. When there are a small number of summary queries that<br />

occur frequently, it is a good strategy to materialize the summary data<br />

needed to answer the queries quickly.<br />

The daily snapshot schema in Figure 8.12 also allows the user to<br />

group by month, quarter, or year. Materializing summary data is useful<br />

for quick response to any query that can be answered by aggregating the<br />

data further.<br />

8.2 Online Analytical Processing (OLAP)<br />

<strong>Design</strong>ing <strong>and</strong> implementing strategic summary tables is a good<br />

approach when there is a small set of frequent queries for summary data.<br />

However, there may be a need for some users to explore the data in an ad<br />

hoc fashion. For example, a user who is looking for types of jobs that<br />

have not been profitable needs to be able to roll up <strong>and</strong> drill down various<br />

dimensions of the data. The ad hoc nature of the process makes predicting<br />

the queries impossible. <strong>Design</strong>ing a strategic set of summary<br />

tables to answer these ad hoc explorations of the data is a daunting task.<br />

OLAP provides an alternative. OLAP is a service that overlays the data<br />

warehouse. The OLAP system automatically selects a strategic set of summary<br />

views, <strong>and</strong> saves the automatic summary tables (AST) to disk as<br />

materialized views. The OLAP system also maintains these views, keep-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!