views:

102

answers:

5

What is the difference between a database and a data warehouse?

Aren't they the same thing, or at least written in the same thing (ie. Oracle RDBMS)?

+3  A: 

Check out this or this.

From the 2nd link:

Database

  1. Used for Online Transactional Processing (OLTP) but can be used for other purposes such as Data Warehousing. This records the data from the user for history.
  2. The tables and joins are complex since they are normalized (for RDMS). This is done to reduce redundant data and to save storage space.
  3. Entity – Relational modeling techniques are used for RDMS database design.
  4. Optimized for write operation.
  5. Performance is low for analysis queries.

Data Warehouse

  1. Used for Online Analytical Processing (OLAP). This reads the historical data for the Users for business decisions.
  2. The Tables and joins are simple since they are de-normalized. This is done to reduce the response time for analytical queries.
  3. Data – Modeling techniques are used for the Data Warehouse design.
  4. Optimized for read operations.
  5. High performance for analytical queries.
  6. Is usually a Database.

It's important to note as well that Data Warehouses could be sourced zero to many databases.

TheCloudlessSky
Wow, you're fast.
Data Man
Data modeling is a generic term and does not only apply to data warehouses. (Perhaps in the second #3 they meant "dimensional modeling" as that is, in my experience, the most popular way to build them.)The last line doesn't make sense: how does a data warehouse "contain" a database? I might say a data warehouse is *sourced* from 0 to many (OLTP) databases.
Patrick Marchand
@Patrick - yeah I wasn't sure how to write the last line... changed it.
TheCloudlessSky
-1 for saying that a database is only used for OLTP. Most data warehouses are stored in databases. Also, database is a *generic* term - normalisation and relational modelling techniques are used in *relational* databases.
Mark Bannister
@Mark - Where does it say databases are ONLY for OLTP? It is showing how databases relate to data warehouses.
TheCloudlessSky
@TheCloudlessSky: Point 1 of Database from your answer: "Used for Online Transactional Processing (OLTP)." No explanation that Databases can be used for other purposes; no explanation that data warehouses normally are databases; contrast between database and data warehouse sections implies that they are two different things, whereas normally the latter is a subset of the former.
Mark Bannister
@Mark - Good point, I'll update the post since I didn't actually write it initially.
TheCloudlessSky
Downvote removed.
Mark Bannister
Can the down voter give a reason?
TheCloudlessSky
A: 

You can find a great explanation here: http://it.toolbox.com/blogs/opensource-analytics/database-vs-data-warehouse-8286

Rafa
+1  A: 

The simplest way to explain it would be to say that a data warehouse consists of more than just a database. A database is an collection of data organized in some way, but a data warehouse is organized specifically to "facilitate reporting and analysis". This however is not the entire story as data warehousing also contains "the means to retrieve and analyze data, to extract, transform and load data, and to manage the data dictionary are also considered essential components of a data warehousing system".

Data Warehouse

kniemczak
+1  A: 

A datawarehouse is a TYPE of database.

In addition to what folks have already said, datawarehouses tend to be OLAP, with indexes, etc. tuned for reading, not writing, and the data is de-normalized / transformed into forms that are easier to read & analyze.

Some folks have said "databases" are the same as OLTP -- this isn't true. OLTP, again, is a TYPE of database.

Other types of "databases": Text files, XML, Excel, CSV..., Flat Files :-)

dave
A: 

From a Non-Technical View: A database is constrained to a particular applications or set of applications.

A data warehouse is an enterprise level data repository. It's going to contain data from all/many segments of the business. It's going to share this information to provide a global picture of the business. It is also critical to integration between the different segments of the business.

From a Technical view: The word "Data Warehouse" has been given no recognized definition. Personally, I define a data warehouse as a collection of data-marts. Where each data-mart consists of one or more databases where the database is specific to a specific problem set (application, data-set or process).

Simply put a database is a component of a data-warehouse. There are many places to explore this concept, but because there is no "definition", you will find challenges with any answer you give.

Markus