Tuesday 19 February 2013

XML way of schemaless PostgreSQL

Since the moment I wrote my previous postgresql-praise-giving post I've been conceiving the idea of writing another one about how to use PostgreSQL in terms of managing data in a schemaless way. First it was just desire to met readers with internal "xml" data type and auxiliary XML-functions, but the latest PostgreSQL release (9.2) with brand new "JSON" feature literally made me mention it as well.

Any developer familiar with typical RDBMS might face the problem of having strict schema which could probably get solved faster using flexible one. Such problems might appear in different cases - a brand new software, like a social game, for instance, which need to have flexibility of storing data in rapidly changing environment; a legacy software, where it costs too much to rewrite software to support strict schema in relational database; even a simple program that's supposed to store data in plain machine-readable format.