I just read about Hash tables and am curious if we use it in practise because if I write a program that stores data in a Hash table, the storage will only be temporary. So, why not use a database to store it ?
In other words, what kinds of real world programs use hash tables for their functioning?
You would use hash tables to store data while you are working. Using the database for that would in many cases be orders of magnitude slower then using in-memory hash tables. See for example:
Hash maps are about speed, not persistence.
Take a look at the other uses in the Uses section of Hash table entry on Wikipedia:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With