From the course: Databases for Node.js Developers

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Introduction to key-value stores

Introduction to key-value stores

From the course: Databases for Node.js Developers

Start my 1-month free trial

Introduction to key-value stores

- An important subset of NoSQL databases are key value stores. While key value stores are very limited, they're also very powerful and fast. In our example, in this chapter we will use Redis for that. So, let's look first at a few details about Redis and also the use cases. So, first of all, Redis basically stores the data in memory. This of course means that this is blazingly fast. At the same time, the data might get lost, if you kill the Redis process. Redis has some mitigation against it. As it stores snapshots of its data periodically on the disk. Still, there is a risk that you lose the data that is stored in Redis when you're in between two snapshots. Redis is very fast and it comes often with constant access times to the data. And if you're familiar with the Big O notation, this sometimes comes with an O(1). So, it does not matter how much data is in the database, the access time will always be the same. So…

Contents