What’s the difference between data mining and data warehousing?


Data mining is the process of finding patterns in a given data set. These patterns can often provide meaningful and insightful data to whoever is interested in that data. Data mining is used today in a wide variety of contexts – in fraud detection, as an aid in marketing campaigns, and even supermarkets use it to study their consumers.

Data warehousing can be said to be the process of centralizing or aggregating data from multiple sources into one common repository.

Example of data mining

If you’ve ever used a credit card, then you may know that credit card companies will alert you when they think that your credit card is being fraudulently used by someone other than you. This is a perfect example of data mining – credit card companies have a history of your purchases from the past and know geographically where those purchases have been made. If all of a sudden some purchases are made in a city far from where you live, the credit card companies are put on alert to a possible fraud since their data mining shows that you don’t normally make purchases in that city. Then, the credit card company can disable your card for that transaction or just put a flag on your card for suspicious activity.

Another interesting example of data mining is how one grocery store in the USA used the data it collected on it’s shoppers to find patterns in their shopping habits.
They found that when men bought diapers on Thursdays and Saturdays, they also had a strong tendency to buy beer.

The grocery store could have used this valuable information to increase their profits. One thing they could have done – odd as it sounds – is move the beer display closer to the diapers. Or, they could have simply made sure not to give any discounts on beer on Thursdays and Saturdays. This is data mining in action – extracting meaningful data from a huge data set.

Subscribe to our newsletter for more free interview questions.

Example of data warehousing – Facebook

A great example of data warehousing that everyone can relate to is what Facebook does. Facebook basically gathers all of your data – your friends, your likes, who you stalk, etc – and then stores that data into one central repository. Even though Facebook most likely stores your friends, your likes, etc, in separate databases, they do want to take the most relevant and important information and put it into one central aggregated database. Why would they want to do this? For many reasons – they want to make sure that you see the most relevant ads that you’re most likely to click on, they want to make sure that the friends that they suggest are the most relevant to you, etc – keep in mind that this is the data mining phase, in which meaningful data and patterns are extracted from the aggregated data. But, underlying all these motives is the main motive: to make more money – after all, Facebook is a business.

We can say that data warehousing is basically a process in which data from multiple sources/databases is combined into one comprehensive and easily accessible database. Then this data is readily available to any business professionals, managers, etc. who need to use the data to create forecasts – and who basically use the data for data mining.

Datawarehousing vs Datamining

Remember that data warehousing is a process that must occur before any data mining can take place. In other words, data warehousing is the process of compiling and organizing data into one common database, and data mining is the process of extracting meaningful data from that database. The data mining process relies on the data compiled in the datawarehousing phase in order to detect meaningful patterns.

In the Facebook example that we gave, the data mining will typically be done by business users who are not engineers, but who will most likely receive assistance from engineers when they are trying to manipulate their data. The data warehousing phase is a strictly engineering phase, where no business users are involved. And this gives us another way of defining the 2 terms: data mining is typically done by business users with the assistance of engineers, and data warehousing is typically a process done exclusively by engineers.

Hiring? Job Hunting? Post a JOB or your RESUME on our JOB BOARD >>

FOLLOW Varoon Sahgal, Author of ProgrammerInterviewon

78 Responses to “Data Mining vs. Data Warehousing”

  1. Charan says:

    That was a nice explanation, now I got soo much clarity on this topics. Thanks :)

  2. beautiful explanation liked it

  3. ruben says:

    it is too easy to understand…thxx

  4. Anonymous says:

    this was really help full example

  5. Ajay Garg says:

    sir salute..superb outstanding …never seen such great examples about data warehousing and data mining

  6. Sheldon Cooper says:

    I have exam in one our at the time when I posted this comment and saw the article!!

  7. Tushar says:

    great explanation.. its very use full data by real time scenarios.
    greate work

  8. barbie says:

    This is nice. Thank you !!!!

  9. Vivek says:

    brilliant, concept got cleared… thanks

  10. joselie castañeda says:

    a big thank you to you dude!

  11. Malik Sajjad says:

    Thank you, amazing way to explain both topics.

  12. Dhivya sampath says:

    it is very useful definition for me

  13. Prince says:

    Tt has worth for thanking.awesome.

  14. Uday Pratap Maurya says:


  15. Daniel says:

    great explanation! Congrats! :)

  16. Ash123 says:

    Too good !

  17. Guest says:

    fantastic examples
    thank you

  18. VendeTTa says:

    love you man… what a lucid and simple definition with some exquisite examples.

  19. shelke says:

    great explanation

  20. rishi vaishnav says:

    nice ….useful

  21. sandeep das says:

    superb explanation with a practical example…thank you

  22. Siva says:

    Who is the author of all these sessions. U r doing a great work. Very simple & detailed explanations for a layman..

  23. Milind Kamble says:


  24. Ravi says:

    Good explanation! This what I looking for about data warehouse and data mining.

  25. Dinesh says:

    really it is the best explanation it can be understood with in few minutes.

    by any one . its awesome!

  26. athithiyien vb says:

    really awesome

  27. A.S says:

    thats really awesome… a good explanation for basic concept of data mining and ware housing

  28. Godson says:

    Great work :)

  29. Kalpit says:

    Good1 :)

  30. Manikandan K says:

    Great information with Simple and neat explanations ! Am almost 2yrs of experience as a engineer and decide to see my career in Business analyst, for the first time searched the meaning for data mining & warehousing, really exited to learn more and to see myself as a Business Analyst in upcoming years ! Great Thanks !

  31. Swapna says:

    Thankyyy :)

  32. anoop pandey says:

    very good knowledge
    thanks for you

  33. kibrom weldehaweria says:

    thanks alot

  34. Khalid says:

    This is awesome explanation. Thank you.

  35. Nambi says:

    Really simple and lot means

  36. Kulal says:

    Good .Thank u.

  37. Danilo Lion says:

    Never saw such a clear explanation as this one! Thanks a lot…. I going to use this examples here (i'm in Brazil) to explain for my students.


  38. KapitanP says:

    ohhmyy goddness thnk u :)

  39. Firoz says:

    Very well explained! Thanks

  40. manu jain says:

    these two concepts never going to forget…

  41. Ajinkya says:


  42. Dave says:

    Was shite

  43. Dave says:

    You're welcome

  44. Dave says:

    spark her up Raj

  45. Ramsha says:

    such a clear and easy to understand explanation. thank you :)

  46. ctmanohar says:

    very useful and easily
    understanding explanation

  47. Archana says:

    Superb explanation.. very easy to understand.. thank yo:):)

  48. bhanu says:


  49. anbu says:

    it's very easy to understanding thank u soooooooooo much

  50. phurba says:

    good one

  51. reka says:

    thanks a lot…

  52. Selvam says:

    Great , Excellent

  53. Excellent explanation,Thank you.

  54. Monu says:

    it is really very helpful…Thanks

  55. Fola says:

    My god!!! I have an exam in 1 hour, just wanted a practical explanation to these concepts and this is superb. Thank you!!!

  56. sakshi says:


  57. chaitu says:

    most useful explained in d most effective way

  58. Scouser says:

    Indeed a good explaination

  59. Raj says:


  60. kisor says:

    thanks alot

  61. Manoj says:

    Nice one

  62. shek says:

    Thanks a lot…… Very clear description.. Thumbs up Dude !! :)

  63. ashu taps says:

    Very well explained..!!

  64. Amir says:

    good explaination…

  65. Ankur says:

    helpful description…thank you.

  66. Ruwan says:

    Great explanations….thank u very much……

  67. Thgopiinadh says:


  68. Priya says:

    excellent example …..

  69. Neeteshpal says:

    thnx a lot…ur info help me a lot

  70. Tao says:

    Very useful for me

  71. Meetraghuram92 says:

    tahnks for you,:)

  72. Vishal says:

    HEY VARUN nice insight case clear could you also guide
    best institutes to train in mining , business intelligence, predictive anaylsis ,& warehousing

  73. Prageeth says:

    this was really helpful…thanx

  74. Anjali Dhanawat says:


Leave a Reply