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

203,288

Solution 1

Check out this for more information.

From a previous 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 from zero to many databases.

Solution 2

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.

Solution 3

A data warehouse is a TYPE of database.

In addition to what folks have already said, data warehouses 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 :-)

Solution 4

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

Solution 5

Data Warehouse vs Database: A data warehouse is specially designed for data analytics, which involves reading large amounts of data to understand relationships and trends across the data. A database is used to capture and store data, such as recording details of a transaction.

Data Warehouse: Suitable workloads - Analytics, reporting, big data. Data source - Data collected and normalized from many sources. Data capture - Bulk write operations typically on a predetermined batch schedule. Data normalization - Denormalized schemas, such as the Star schema or Snowflake schema. Data storage - Optimized for simplicity of access and high-speed query. performance using columnar storage. Data access - Optimized to minimize I/O and maximize data throughput.

Transactional Database: Suitable workloads - Transaction processing. Data source - Data captured as-is from a single source, such as a transactional system. Data capture - Optimized for continuous write operations as new data is available to maximize transaction throughput. Data normalization - Highly normalized, static schemas. Data storage - Optimized for high throughout write operations to a single row-oriented physical block. Data access - High volumes of small read operations.

Share:
203,288

Related videos on Youtube

Data Man
Author by

Data Man

Updated on September 09, 2021

Comments

  • Data Man
    Data Man almost 3 years

    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)?

  • Patrick Marchand
    Patrick Marchand almost 14 years
    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.
  • TheCloudlessSky
    TheCloudlessSky almost 14 years
    @Mark - Where does it say databases are ONLY for OLTP? It is showing how databases relate to data warehouses.
  • Admin
    Admin almost 14 years
    @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.
  • Solomon Duskis
    Solomon Duskis almost 12 years
    This answer confuses "database" (a generic term) and an "OLTP database". The bullets for the "database" actually only apply to OLTP databases (before the edit that mentioned DW databases).
  • TheCloudlessSky
    TheCloudlessSky almost 12 years
    @Nickolay - This is a two year old answer. Edit it and fix it if you're concerned.
  • sanzy
    sanzy over 8 years
    @DataMan - Mark this as correct answer. its a pretty good and fair response for your question.
  • QAIS
    QAIS over 8 years
    what is the difference between Data – Modeling techniques and Entity – Relational modeling techniques ?
  • CᴴᴀZ
    CᴴᴀZ about 8 years
    The Datamart is preferably an OLTP database?
  • CᴴᴀZ
    CᴴᴀZ about 8 years
    This is the correct answer of them all. And a bit on Datamart: It is a logical subset of Data warehouse, generally based upon business functions.
  • Enrique Benito Casado
    Enrique Benito Casado almost 7 years
    @CᴴᴀZ for what ? Datamart are created for the OLAP , Datamart is bassically a small DWH (for a small part of the business) . it is created for Analysis so if you need a OLTP System a Datamart is not your choice , if you need a Data-Model for Analysis (Start Schema or Snow flow) then you would prefer a Datamart.
  • CᴴᴀZ
    CᴴᴀZ almost 7 years
    Hey @Enrique, got your point: Datamart contributes to the OLAP. I took the cue of Datamarts being OLTP from here - SQL Server OLTP Datamart.
  • Enrique Benito Casado
    Enrique Benito Casado almost 7 years
    Hi @CᴴᴀZ , I read the article and it would be just how to make a OLTP with a Datamart. ok . (but I think they said it like exception) Take acount that how they say over, OLTP Tables they have to be normalized in order not to have inconsistences . the normalization is not so complicated to do in a E-R schema but it´s much more complicate for Star-Schema or Snow-Flow thats. These Schemas are made to ease a read in the Database and not a transactional operations. Thats why using a Datamart like OLTP should be no t a good idea even if is posible.