PostgreSQL Hstore: The Key Value Store Everyone Ignored
A post rehashing PostgreSQL hstore capabilities:
I will be focusing on a key value store that is ACID compliant for real! Postgres takes advantage of its storage engine and has an extension on top for key value storage. So plan is to have a table can have a column that has a datatype of hstore; which in turn has a structure free storage. Thinking of this model multiple analogies throw themselves in. It can be a Column Family Store just like Cassandra where row key can be PK of the table, and each column of hstore type in table can be imagined like a super column, and each key in the hstore entry can be a column name. Similarly you can imagine it some what like Hash structures in Redis (HSET, HDEL), or 2 or 3 level MongoDB store (few modifications required). Despite being similar (when little tricks are applied) to your NoSQL store structures, this gives me an opportunity to demonstrate you some really trivial examples.
A couple of comments:
- you can store key-value pairs in any relational database
- there are quite a few ACID key-value stores available
- hstore is more like a document store. Values are not opaque and it supports queries against them.
- not everyone needs a document database when a key-value store is enough. The most common example is storing web sessions.
- not everyone needs an ACID compliant database. Not in a distributed system requiring high availability.
Anyway, the conclusion remains the same.
Update: there’s a long thread discussing this post on Hacker News .
Original title and link: PostgreSQL Hstore: The Key Value Store Everyone Ignored (©myNoSQL)
via: http://blog.creapptives.com/post/14062057061/the-key-value-store-everyone-ignored-postgresql