How can I implement a large relational database schema on a key value store?
The following are the requirements:
1) uses no stored procedures or special database vendor specific features
2) Uses indexes
3) Uses joins
4) Many com开发者_如何学Cplex types in tables (VARCHAR, INT, BLOB, etc)
5) Billions of records
6) Full text search
7) Timestamped backup possible
8) Transactions not needed (atomic single row/field updates only)
You will have to, in essence, build your own relational database system. Without it, joins will be horribly slow (no query optimizer). You can get full text search by grafting on Lucene.
Have you considered an open source RDBMS (e.g. Derby)?
Often, the whole point of a key-value store is to get away from the constraints of relational databases, but it sounds like you want them back here. Everybody wants to have their cake and eat it too, but I'm confused about what you're trying to accomplish here. if you want the power of a relational database, you should use a relational database.
That said, you may want to take a look at MongoDB, which represents a very good compromise between the rigid, structured nature of relational databases and the more free-form approach of a key-value store.
精彩评论