Traditional Culture Encyclopedia - Traditional culture - What is the difference between a database and a data warehouse?

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

Database: The main application of traditional relational databases is mainly basic, day-to-day transaction processing, such as banking transactions.

Data Warehouse: The main application of a data warehouse system is OLAP (On-Line Analytical Processing), which supports complex analytical operations, focuses on decision support, and provides intuitive and easy-to-understand query results.

Basically every e-commerce company will go through, from only needing a business database to want a data warehouse stage.

E-commerce is very easy to start in the early days, and the barrier to entry is low. Find an outsourcing team, make a web front-end that allows you to place orders + a few servers + a MySQL, and you're open for business. It's like the handmade workshop period.

The second stage, the traffic came, customers and orders are more up, the ordinary query has been under pressure, this time you need to upgrade the architecture into multiple servers and multiple business databases (volume + sub-base and sub-table), this stage of the business figures and indicators can be barely queried from the business database. Initial entry into industrialization.

The third stage, generally takes about 3-5 years, with the exponential growth of the business, the volume of data will increase steeply, the role of the company also began to more, began to have a CEO, CMO, CIO, we need to face the problem of more and more complex "last month's PV, UV is how much", gradually evolved to a very granular and specific user. to a very refined and specific user cluster analysis, specific users in a certain use scenario.

So here the first kind of business database (read and write are optimized) is a business database, the latter is an analytical database, i.e. data warehouse.

Finally, to summarize:

Databases More popular: MySQL, Oracle, SqlServer, etc.

Data warehouses More popular: AWS Redshift, Greenplum, Hive, etc.

Data warehousing is the most popular way to use the database.