Using a relational database and a key-value store in combination

Using a relational database and a key-value store in combination

The requirements for the project I'm working seem to point to using both a relational database (e.g. postgre, MySQL) in combination with a key-value store (e.g. HBase, Cassandra). Our data almost breaks nicely into one of the two data models with the exception of a small amount of interdependence.

This is not an attempt to cram a relational database into a key-value store; they are independent of each other.

Are there any serious reasons to not do this?

Run methods as service c#?


How to layout the code of a simple game?
I work in SQL DBMS territory, so take that bias into account, but....
Language integration
As with Shiraz Bhaiji, I worry about the "except for a small amount of interdependence".

What features are the most important for data-bound grid controls
There are a number of things to think about, the answers to which will help you determine what to do..
Function with variable number of args in C and a design-oriented question
  • What happens if something goes wrong with the interdependence? (Customers lose money - then you need to use a DBMS throughout; you lose money - probably the same; someone gets reported as having 3045 points when they really have 3046 - maybe it doesn't matter.)
  • How hard is it to fix up the 'mess' when something goes wrong?
  • How much of the work is on the key-value store and how much is on the DBMS?
  • Can the interdependence be removed by moving some stuff from key-value store to DBMS?
  • How slow is the DBMS when used as a key-value store? (Are you sure there's no way to bring it close enough to parity?)
  • What happens in disaster recovery scenarios? Synchronized backups?
If you have adequate answers to these and related questions, then it is OK to go with the mixed setup - you've thought it through, weighed the risks, formed a judgement, and it is reasonable to go ahead.

Refactoring domain logic that accesses repositories in a legacy system
If you don't have answers, get them..
Producer and consumer problem in Haskell?

Critique my server design please


It should work fine.. There are a couple of things you need to be aware of / watch out for:.
  • Your program is now responsible for the data consistency between the stores, not the relational model.
  • Depending on your technology you may or may not have transactions that span the data stores.

    Here you might have to program some manual clean up work in the case of a failure.


When you say key-value store are you meaning like in a session or a cache type of implementation? There are always reasons to do such things...reading from and writing to a database is generally your most resource intensive operation.

More details?.

76 out of 100 based on 86 user ratings 886 reviews