I would say because you get more out of an RDBMS than merely relational data structure. You also get:
- High level and powerful query language (OtoDB uses this feature rather extensively)
- Optimized storage and data retrieval engine (data indexes, etc)
- A well-known paradigm
- Additional power at the data server level like views, or clusters
An RDBMS does more than just store and retrieve datasets. It also prepares data based on SQL commands you send it. Maybe I'm wrong, but it seems that memcached is just a storage mechanism. I.e. your code has to handle sorting/filtering. With an RDBMS you can ask the data servers to do this.
There are probably some other reasons too, that I'm not thinking of. I should also point out that you are in fact using one relational feature, that of one-to-one relationships.
| [reply] |
You're not going to get 65k queries per second out of an RDBMS if any of those queries have to do JOINs, and you're not going to put Varnish in front of it to speed it up even further. You can do that with memcached and CouchDB, for example.
I'm by no means suggesting that there's anything wrong with JOIN, or that every persistent data storage needs to do what eBay or MySpace or Amazon.com does. Yet by the time your problem is that your database is a bottleneck, slapping something on top of the database doesn't seem like the right approach.
(Similarly, I have the strong belief that if ActiveRecord could run on something other than an RDBMS, everyone would be a lot happier.)
| [reply] |
One problem with memcached is that it is hard to take a backup of it. I love the product, but I also like my data to be a little safer than that. Using memcached in front of a database gives me the best of both worlds.
Another reason to use an RDBMS is that while your application may not take advantage of the relational structure, it is still there to be exported to and manipulated on reporting databases. | [reply] |
Using memcached in front of a database gives me the best of both worlds
This was kind of how I thought memcached fit best with OtoDB. As the code currently stands, you will only be able to add a certain number of data servers before querying them all incrementally will prove a bottleneck (at least if my intuition doesn't fail me here). memcached is the obvious choice to keep queries frosty as you add more servers.
Also, to go along with your other point, an RDBMS also makes it easy to rebalance data, e.g. if you add new servers to a set of existing servers, and want to move some of the load over.
| [reply] |