6

Can anyone tell me the difference between a simple database and a data warehouse in terms of implementation?

I know that data warehouse is used for analysis rather than keeping record but I don't understand how are they structurally different

In simple database we have tables and so in a data warehouse. How can we make a data warehouse out of a simple database

In both cases we have queries so how are they different for each of them?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Waheed Khan
  • 1,323
  • 6
  • 18
  • 28
  • possible duplicate of [What is the difference between a database and a data warehouse?](http://stackoverflow.com/questions/3419353/what-is-the-difference-between-a-database-and-a-data-warehouse) – Pondlife Feb 12 '13 at 21:18

4 Answers4

9

The differences are in the implementation, that is the representation (structure) of the data in tables.

A simple database is typically structured in normalized tables in order to minimize redundancy and optimize writing operations to the table. This can be achieved by dividing large tables into smaller and less redundant tables, so that data of the same kind are isolated in one place so that additions, deletions, and modifications of a field can be made in just one table. The smaller tables are then connected together via defined relationships between them (this is done by foreign keys), resulting in many joins between tables when retrieving the data.

On the other hand a datawarehouse is structured for reading operations only, which is why a datawarehouse accepts some level of redundancy in the data, because this makes reading faster. In a datawarehouse data is typically structured in what is called a Starschema approach through the use of dimensional modeling. That means you have 1 big table (Facttable) with all the relevant records and measures (fx sales amount in $), and then many minor tables (called dimensiontables) that describes the values in the facttable. Dimensiontables could be something like Date, SalesCountry, SalesPerson, Product etc. that all describes the sales amount from the facttable. The dimensiontables are then related to the facttable with foreign keys, thereby creating the star like figure with the facttable in the middle and all the dimensiontables around it in a circle linking to it.

NB: This is a very simple introduction, and you should of course refer to some datawarehouse litterature to read more details. Look for books by Ralph Kimball and Bill Inmon, they are the gurus within the datawarehouse field.

MOLAP
  • 784
  • 4
  • 13
  • 28
2

Assuming you already know something about OLTP databases, the IBM Redbooks have a couple of downloadable titles about data warehouses that are worth looking at.

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185
1

OLTP stands for Online Transaction processing. The systems that are used in any booking system or in technical terms "OLTP, refers to a class of systems that facilitate and manage transaction-oriented applications, typically for data entry and retrieval transaction processing"

Now the next questions arrive what is the difference between OLTP and Data Warehouse?

There are many differences between the two, so we will list down some of the important differences :

  • The most important difference of all is : OLTP is normally in 3NF (3rd Normalized Form) whereas Data Warehousing is not in 3NF. Therefore, we can also infer that OLTP won't have any kind of Data Redundancy.

  • Data warehouse is used to store months and years of data to support historical analysis, whereas OLTP system store data for a few weeks or months. Therefore the sizes of the DB also has a vast difference. OLTP uses 100MB - 100GB where a Data Warehouse uses 100GB- few terabytes.

  • The highly normalized structure of the OLTP helps it to optimize the operations such as UPDATE/INSERT/DELETE, where Data Warehouse has a very de-normalized structure (Star Schema) to optimize query performance.

  • Data in Data Warehouse is pushed on regular basis by ETL process and end user do not update the data warehouse directly whereas in OLTP systems, end users routinely issue individual data modification statements to the database and thus the OLTP system is up to date.

These are few important differences between OLTP and Data Warehouse.

Read more

farhankhwaja
  • 159
  • 7
1

In essence, the way that data and tables are organized -- and more...

Read

  • Bill Inmon "Building the Data Warehouse"
  • Ralph Kimball "The Data Warehouse Toolkit"
Damir Sudarevic
  • 21,891
  • 3
  • 47
  • 71