I am looking ways to implement schema free data store design. However, usually the term schema-free is used in the context of NoSQL school. I am not interested in the scalability advantage of NoSQL. One example is the friendfeed way (as explained in Bret Taylor’s blog). Can you point me some other resources or design examples/case studies where the primary aim is to have a flexible/schema-free design (I am even ok with sacrificing performance for this) ?
I am looking ways to implement schema free data store design. However, usually the
Share
I’m not 100% sure about your use case, could you share some more info about what you are trying to do?
When you say you are not interested in “NoSQL” does that mean you have to implement everything on top of a relational database? (Which one?)
There are a couple of approaches to make relational schemas more flexible:
EAV / Entity-Attribute-Value designs, where one table stores common info about all “entities” / objects in the system, one table contains info about the attributes these entities can have and one table which stores (entity_id, attribute_id, value). See http://en.wikipedia.org/wiki/Entity-attribute-value_model for example.
“skinny tables”, where you have wide tables with one column per column type (one varchar column, one blob column, one int column etc.) and then only fill the columns that match the type of value you want to store. This makes sense when you only want to store different types of values rather than changing you attributes on the fly. Can be used to store the attributes in an EAV schema.
Storing “triple” data: the semantic web people have spent quite a bit of time investigating how to best store RDF data, consisting of subject-relationship-object triples. There are “real” RDF stores with their own query language, but some of these can use a relational DB as the storage backend. If this sounds like the way to go, have a look here: http://www.w3.org/2003/01/21-RDF-RDB-access/ – a simple Google query for “storing rdf in a relational database” should point you to several Triplestore implementations that effectively map into relational DBs.
Hope this helps!