What is a Key Value Database?
FAQs
What is a key-value database?
A key value database is a type of NoSQL database that stores data in the form of key value pairs—for example, “name”: “John Drake.” Here, the name is the unique key that identifies the object, and John Drake is the value associated with it.
When would you use a key-value database?
There are several use cases for a key value database—for example, session management, caching, managing configuration settings, real time data analytics, and storing user preferences and profile information.
Is MongoDB a key-value database?
MongoDB is a document database that can be used as a key value database due to the way data is stored. MongoDB stores data as JSON documents in a key value format, which makes the model flexible and easy for retrieval.
What is the difference between a key-value database and a document database?
In a key value database, data is stored as a simple key value pair. You can store data types like string, number, blobs, and arrays. A document database is more flexible and can store nested data as well, in the same key value format (typically JSON or BSON structure). Document databases also offer advanced query capabilities, which is not possible in a key value datastore. Key value databases are suitable for fast and simple data retrievals.
Get started with Atlas today
Get started in seconds. Our free clusters come with 512 MB of storage so you can play around with sample data and get oriented with our platform.
GET STARTED WITH:
- 125+ regions worldwide
- Sample data sets
- Always-on authentication
- End-to-end encryption
- Command line tools