What is the best key-value database?

What are the uses of a key-value database?

  • I've heard about highly scalable key-value databases, like http://aws.amazon.com/dynamodb/ and http://fallabs.com/kyotocabinet/. But I can't see an use for everyday problems. Ex.: Suppose I have a "post object", which has an id, a title, a content and some tags, and I want to query the database to find all posts with some particular tag. How can I do it with a key-value database?

  • Answer:

    Key value stores are extremely fast (typically in memory) and provide eventual consistency. Many of the standard database features such as ACID may not exist but at the same time none of the limitations such as too many writes etc., also exist. The idea is to think outside of the traditional key-value store as you would do in a hashtable and instead look at this form of storage as a de-normalized form of storage that is designed based on the queries you want to fire at it. In your specific question I would use the tags as keys and the post-id as values. Then bingo...

Sony Santos at Stack Overflow Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.