Data Warehouse vs. OLAP Cube?

2019-03-08 01:18发布

Can anyone explain what is really distinction between Data Warehouse and OLAP Cubes?

Are they different approach for same thing?

Is one of them deprecated in comparison with other?

Are there any performance issues in one of them?

Any explanation is welcomed

3条回答
放荡不羁爱自由
2楼-- · 2019-03-08 01:58

A data warehouse is a database with a design that makes analyzing data easier† (often with data from multiple sources). It is usually composed of fact tables and dimension tables, and often aggregate tables.

OLAP is a set of operations that one can do on a data set, such as pivoting, slicing, dicing, drilling. For example, one can do OLAP operations with Excel PivotTables.

You can have a data warehouse and not use OLAP at all (you just run reports).

You can also do OLAP operations on something other than a data warehouse, such as a flat file.

An OLAP Server is a type of server software that facilitates OLAP operations, for example with caching and query re-writing. OLAP operations are often expressed in MDX, and your OLAP server might translate MDX into regular SQL for your database. Or it might work against its own binary file format.

Are they different approach for same thing?

No, a data warehouse is a place to store data in an easily analyzable format, and OLAP is a method to analyze data.

Are one of them deprecated in comparison with other?

No, they compliment each other in that a data warehouse makes it easy to analyze data using OLAP, and OLAP can make analyzing a data warehouse more useful.

Is there any performance issues in one of them?

Yes. A data warehouse is meant to store lots and lots of data, and thus it will take time to query. Performance can be improved by using indexes, caching, partituoning, and by pre-aggregating some data.

See also: https://dba.stackexchange.com/questions/45655/what-are-measures-and-dimensions-in-cubes

† as opposed to making transactions easier/more integral

查看更多
SAY GOODBYE
3楼-- · 2019-03-08 02:00

Are they different approach for same thing?

No, a data warehouse is a place to store data in an easily analyzable format, and OLAP is a method to analyze data.

No, they really do the same things! OLAP is more precalculate than DWH. OLAP is like aggregates in DWH

查看更多
Deceive 欺骗
4楼-- · 2019-03-08 02:03

A data warehouse holds the data you wish to run reports on, analyze, etc.

A cube organize this data by grouping data into defined dimensions. You can have multiple dimensions (think a uber-pivot table in Excel).

For example, in your data warehouse you have all your sales, but running complex SQL queries can be time consuming. So from your data warehouse you create a cube which indexes and precompute the data. In your cube you could have all those precomputed dimensions : sales by months, by week, by salesman, by client, by geographical region, by product color, etc. Then you can run OLAP queries on your cube to have the total, average and maximum sales by (month, salesman, region), or by (color, region), or by (salesman, month). Since all the data is precomputed and indexed, the queries are really fast.

查看更多
登录 后发表回答