Design of a Data Warehouse
Benefits, the four design views, top-down vs bottom-up, the 4-step design process, three-tier architecture, the metadata repository, and ROLAP / MOLAP / HOLAP servers.
▶Lecture videos
Click any timestamp — here or inside the notes — to jump the video to that moment. Your position is remembered.
Weka 1.3 – Exploring datasets
Looking inside datasets in Weka: ARFF format, nominal vs numeric attributes, and the class attribute.
00:17Introduction: exploring datasets00:47The weather data: attributes and the class01:11Opening a dataset in the Explorer01:36Viewing attribute values02:07Changing the class attribute02:33Input: a dataset of classified examples03:14Nominal vs numeric attributes; continuous classes04:14The numeric weather data04:46The glass dataset05:13The class: types of glass05:58Check values for reasonableness07:16Looking inside the ARFF file09:39Summary1Why build a data warehouse?
To build an effective warehouse you need a clear understanding and analysis of business needs. The four benefits:
| Benefit | How the warehouse delivers it |
|---|---|
| Competitive advantage | Presents relevant information to measure performance and make critical adjustments to beat competitors |
| Business productivity | Quickly and efficiently gathers information that accurately describes the organisation |
| Customer relationship management | Gives a consistent view of customers and items across all lines of business, departments and markets |
| Cost reduction | Tracks trends, patterns and exceptions over long periods, consistently and reliably |
2The four views of warehouse design
Building a large information system is like constructing a large building: the owner, architect and builder each have a different view. A warehouse has four views:
| View | Whose perspective / what it shows |
|---|---|
| Top-down view | Selects the relevant information the warehouse needs, matching current and future business needs |
| Data source view | The information captured, stored and managed by operational systems, at various levels of detail. Modelled with ER models or CASE tools |
| Data warehouse view | The fact and dimension tables stored inside the warehouse, including pre-calculated totals and counts plus source, date and time of origin for historical context |
| Business query view | The data as seen by the end user |
Top-down → what we need · Source → what we have · Warehouse → what we store · Business query → what users see.
3Design approaches & methodology
Top-down, bottom-up or combined
| Approach | Starts with | Best when |
|---|---|---|
| Top-down | Overall design and planning | Technology is mature and well known, and the business problems are clear and well understood |
| Bottom-up | Experiments and prototypes | Early stage of business modelling and technology. Lets the organisation move forward at much less expense and evaluate benefits before committing |
| Combined | Both | Gets the planned, strategic nature of top-down plus the rapid implementation and opportunistic use of bottom-up |
Software-engineering steps
There are two development methodologies:
- Waterfall: structured, systematic analysis at each step before moving to the next, falling from stage to stage.
- Spiral: rapid generation of increasingly functional systems with short intervals between releases.
4The 4-step warehouse design process
- Choose a business process to model, e.g. orders, invoices, shipments, inventory, account administration, sales, general ledger.
- The process is organisational with many complex object collections → use a data warehouse model.
- The process is departmental, focused on one kind of business process → use a data mart model.
- Choose the grain: the fundamental, atomic level of data in the fact table, e.g. individual transactions or individual daily snapshots.
- Choose the dimensions for each fact-table record, e.g. time, item, customer, supplier, warehouse, transaction type, status.
- Choose the measures for each fact-table record, usually numeric additive quantities such as dollars_sold, units_sold.
Follow the 4 steps. The fact table and DMQL update as you choose.
"State the steps of the warehouse design process" means process → grain → dimensions → measures, each with an example. Also be able to explain top-down vs bottom-up.
5Three-tier data warehouse architecture
TOP TIER ┌─────────────────────────────────────────────┐
Front-end │ Query/report tools · Analysis · Data mining │
client └──────────────────────┬──────────────────────┘
MIDDLE TIER ┌──────────────────────┴──────────────────────┐
OLAP server │ ROLAP or MOLAP OLAP server │
└──────────────────────┬──────────────────────┘
BOTTOM TIER ┌──────────────────────┴──────────┬───────────┐
Warehouse │ Data warehouse (relational DB) │ Metadata │
DB server │ + Data marts │ repository│
└──────────────────────┬──────────┴───────────┘
Extract · Clean · Transform · Load · Refresh
Operational databases External sources
| Tier | What it is | Key points |
|---|---|---|
| Bottom | Warehouse database server, almost always a relational DB | Back-end tools extract, clean, transform, load and refresh data from operational and external sources. Holds the metadata repository |
| Middle | OLAP server | Either ROLAP (extended relational DBMS that maps multidimensional operations to relational ones) or MOLAP (special-purpose server that implements multidimensional data directly) |
| Top | Front-end client layer | Query and reporting tools, analysis tools, data mining tools |
From the architecture point of view there are three warehouse models:
- Enterprise warehouse: covers the whole organisation.
- Data mart: a departmental subset.
- Virtual warehouse: a set of views over operational databases; easy to build but needs spare capacity on the operational servers.
6The metadata repository
Metadata = data about data. In a warehouse, metadata define the warehouse objects. The repository sits in the bottom tier.
- Metadata are created for data names and definitions.
- Extra metadata record timestamps of extracted data, the source of the information, and missing fields added by cleaning or integration.
What the repository should contain (six things):
| # | Contents | Includes |
|---|---|---|
| 1 | Structure of the warehouse | Schema, views, dimensions, hierarchies, derived data definitions, data mart locations and contents |
| 2 | Operational metadata | Data lineage (history of migrated data and its transformations), currency of data (active, archived or purged), monitoring (usage statistics, error reports, audit trails) |
| 3 | Summarisation algorithms | Measure and dimension definitions, granularity, partitions, subject areas, aggregation, predefined queries and reports |
| 4 | Mapping from operational environment to warehouse | Source DBs, gateways, partitions, extraction/cleaning/transformation rules, refresh and purge rules, security (authorisation, access control) |
| 5 | System performance data | Indices and profiles for fast access, plus timing and scheduling of refresh, update and replication |
| 6 | Business metadata | Business terms and definitions, data ownership, charging policies |
Structure · Operational · Summarisation · Mapping · Performance · Business
7OLAP server models: ROLAP, MOLAP, HOLAP
| ROLAP (Relational OLAP) | MOLAP (Multidimensional OLAP) | HOLAP (Hybrid OLAP) | |
|---|---|---|---|
| Storage | Relational / extended-relational DBMS plus OLAP middleware | Array-based multidimensional storage engines: data cube arrays | Detail data in relational DB, aggregations in a MOLAP store |
| Strength | Greater scalability | Fast indexing to pre-computed summarised data | Both: scalability of ROLAP + fast computation of MOLAP |
| Notes | Optimisation for each DBMS back end; aggregation navigation logic | Two-level storage: dense sub-cubes as arrays, sparse sub-cubes compressed | — |
| Example product | MicroStrategy DSS server | (e.g. Essbase) | Microsoft SQL Server 2000 |
ROLAP vs MOLAP in one line each
- ROLAP: data stays in tables, so it scales to huge data but answers more slowly.
- MOLAP: data sits in cube arrays, so it is very fast but less scalable and can waste space on sparse data.
Dense vs sparse
A dense sub-cube has most cells filled, so arrays are efficient. A sparse one has mostly empty cells, so MOLAP compresses it.
8Weka 1.3 — Exploring datasets
The Weka video shows what's inside a dataset:
- ARFF format (Attribute-Relation File Format): a header with
@relation,@attributelines (name and type), then@datawith one instance per line. - Nominal attributes take values from a fixed set (e.g. outlook = sunny/overcast/rainy). Numeric attributes are numbers (e.g. temperature).
- The class attribute (usually the last one) is what we want to predict (e.g. play = yes/no in the weather dataset).
@relation weather
@attribute outlook {sunny, overcast, rainy}
@attribute temperature numeric
@attribute humidity numeric
@attribute windy {TRUE, FALSE}
@attribute play {yes, no}
@data
sunny,85,85,FALSE,no
overcast,83,86,FALSE,yes
9Quick revision sheet
| Concept | Remember it as |
|---|---|
| Benefits | Competitive advantage · productivity · CRM · cost reduction |
| 4 views | Top-down · Data source · Data warehouse · Business query |
| Top-down vs bottom-up | Plan first (mature tech, clear problems) vs prototype first (early stage, cheaper) |
| Waterfall vs spiral | Step-by-step vs rapid increasing releases |
| 4 design steps | Business process → Grain → Dimensions → Measures |
| 3 tiers | Bottom: relational warehouse server + metadata · Middle: OLAP server · Top: client tools |
| 3 models | Enterprise warehouse · Data mart · Virtual warehouse |
| Metadata | Data about data; 6 contents (SOS-MPB) |
| ROLAP | Relational, scalable (MicroStrategy) |
| MOLAP | Arrays, fast, dense/sparse two-level storage |
| HOLAP | Detail in ROLAP, aggregates in MOLAP (MS SQL Server 2000) |
?Self-check quiz
10 questions on this week. Answer them all, then press Check my answers. Your best and latest scores are saved and shown on the subject page.