A very interesting set of slides from Christophe Pettus looking at the features in PosgreSQL that would allow one to use it as a document database:
- built-in type
- can handle very large documents (2GB)
- XPath support
- export functions
- no indexing, except defining custom ones using expression index
- hierarchical storage type
- in contrib (not part of the core)
- custom functions (nb: very ugly syntax imo)
- GiST and GIN indexes (nb: I’ve posted in the past about PostgreSQL GiST and GIN Index Types)
- supports also expression indexes
- built-in type starting with PostgreSQL 9.2
- validates JSON
- support expression indexing
- nothing else besides a lot of feature scheduled for
Christophe Pettus’s slides also include the results and some thoughts about a locally-run pseudo-benchmark against these engines and MongoDB.
You can see all the slides and download them after the break.
Original title and link: PosgreSQL as a Schemaless Database ( ©myNoSQL)
Out of all the supported databases available in Active Record,
PostgreSQL received the most amount of attention during the
development of Rails 4. In today’s countdown post, we are going to
look at the various additions made to the PostgreSQL database
- hstore and hstore indexes support
- network address data types
- int4range, int8range
Original title and link: Improvements in Rails 4 ActiveRecord for PostgreSQL ( ©myNoSQL)
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)