Database Query – How to Query Key/Value Store Efficiently

databasedatabase-designdatabase-developmentqueryredis

I don't know whether this question is reasonably answerable (and therefore will be closed), but I will take my chances: What are the possible problems (and solutions), one might encounter, when developing query mechanism for key/value store/database (like redis for example)? All the values will consist only of JSON documents and all data will be located only in RAM. Query mechanism should be able to search/query for data based on document field values, so I assume one of the problems might be performance based on number of docs in database (this could however be lowered by partitioning documents based on their type like posts, comments, …).

Best Answer

I am not familiar with Redis, however, some other key/value store databases have the following problems:

  1. Updates are not instantly visible immediately.

  2. SQL joins are to be performed by application.

  3. Some SQL features such as Distinct, Group By are to be performed by application.

  4. No stored procedures, triggers, etc.

  5. No FKs

(2) and (3) above are particulary important because to achieve this you have to move large amounts of data to the client as well as write the logic.

Related Topic