Dynamically Typed Storage


Today I've attended a defense of diploma thesis by Andrej Slapnik whom I've been mentoring for the past couple of months. The topic of Andrej's thesis was ORM over non-relational databases in general and in particular over Apache Cassandra. Of course, in this context the letter R in ORM should be replaced with some other letter but we decided to keep it since ORM has become a standard term for describing a layer that handles persistence of objects. As is often the case the mentor learns almost as much as the one being mentored. The biggest takeaway of Andrej's work for me was the realization that non-relational databases enable dynamically typed storage. Relational databases are statically typed since you're required to first define schema before you can store data. And once you have data stored it's not easy to change the schema. On the contrary, non-relational databases such as Cassandra enable the programmer to store the data in whatever structure they want. As is also the case in programming languages, the dynamic typing is a double-edged sword. It gives more freedom to programmer but also more responsibility to store data in correct form.

Enhanced by Zemanta