SQL and NOSQL we need both for most Deployments

As the use of the Internet grows many of the data storage and persistent needs of the projects are getting larger and larger.

I have read many post about the NO-SQL solutions and I have started to use MongoDB for several of my NO-SQL Deployments.

But we need to keep a sharp watch out for the correct tools for the jobs we have to solve. Some times a true Relational Database is the correct solution. Some times it is not and a fully de-normalized solution works better.

What are the indicators and how do you pick?

If the information needs to be shared by all of the servers the correct solutions are:

1) Memcached - a very fast key value store. With a very simple API.
2) CDN - What? on this list? Yes, the CDN is a great way to share content and state for all of the Web servers.
3) Database - The classic MySQL comes to mind.
4) No-SQL - Like MongoDB and others.

So how do you pick? What is the correct hammer for this task?

The whole point of this post is that you may need both. Not just the new fancy NO-SQL Solution, but a mix of old and new.

Relational DB Solutions work well when the combination and permutations of the results are vast. The way a Relational Database folds the result space allows for a large number of results from a small database. When you need a Relational Database you will know. The De-normalized version of the data set will be huge and not manageable.

If the De-Normalized version of the result set is small and fits in RAM. We have a good case for a Key Value Store like Memcached.

So what about CDN, how does that fit into this list? Some times the STATE we want to "share" is a large Image or collection of Images for example. This is a nice De-Normalized Data Set. The CDN can be used to provide these images or set of images. When an update is needed all of the servers in the farm will serve the new images. Just like the Database solution. So think of this as form of Key Value Store, but for large data sets.

Some where in this post you may start to understand. Select with care the right solution. You may need both Relational and Key Value solutions, or some where half way.

If you pick with care, your application will scale well and stay cost effective.

Edward M. Goldberg