In these last days I’ve talked a lot with developers to understand why the “NoSQL” idea fascinates them so much. Or, put in other words, why they think that leaving RDBMS behind will help them.
Well, rephrasing again, I can formulate the question in a more direct form: “What you don’t like of RDBMS, that brings you to ask such huge change?”
I’d like to share with you what I discovered, even if the number of developer to whom I talked to is small and thus – maybe – not representative of the whole, but nevertheless I think is significant.
First important thing that immediately shows up, is that there a lot of confusion between the Relational Model – the mathematical fundaments of RDBMS – and the physical implementation of it, which is the RDBMS itself.
I’m sure this is nothing new, but it’s an important point to keep in mind. This is the key to understand the NoSQL idea, and to give answer to it.
Developers complain that RDBMS does not scale. While, for my experience, this is not totally true, I can pretend to agree, but even in this case, the problem is in the implementation not in the model. Is not that leaving the relational model behind will make databases more scalable.
Other complains regard the fact that SQL is too verbose and quite frustrating sometimes because ask you to write too much “ugly” code. I agree with that. Writing queries to join many table on many columns is just boring. But again I don’t really see how dropping the relational model could help on this side.
One last big complain is that if a developer has an object – an instantiated class – and he only needs to persist it, he can’t. He have to map object attributes to tables and columns, which is, again, time consuming and boring. And in addition this doesn’t offer optimal performance since such mapping, of course, consumes resources. I agree also on this. But I know that in “Third Manifesto” this problem is totally solved, just making RDBMS aware of Object-Oriented principles. Now, if Microsoft can just integrated more and more SQL Server with .NET, the problem will be solved. I know that Oracle is way more integrated with Java, so we can ask for the same thing. But, hey, even here I don’t see how eradicating the relational model can help. On the contrary the proposed improvement of it can make our life easier and still safer (in terms of data quality).
So, at the end, my idea is that NoSQL doesn’t really mean “Throw relational databases away”, but more something like “Give me correct implementation of the relational model, make it capable to handle objects (in Object Oriented Principles way), make SQL less verbose and more integrated with .NET and give me something that I can scale automatically.”
As said before this is something I can understand and with which I can also agree. And some steps toward this objective has been already made, we just have to keep going in that way, even if it has lost it’s marketing power (I’m sure it’s easier to sell new features than improving the existing ones…)
Let’s have SQL Server that really implements the relational model so that I have do define my types so that I can be warned at runtime that I’m joining between Customers and Products but types are incompatible (even if they are just integers behind the scenes, just like classes are composed of base types!)
Let SQL Server be able to handle objects in an object-oriented way. Let me be able to use inheritance.
Make LINQ even more integrated with SQL Server. It would be nice if it could push queries directly to the SQL Engine, without having to convert it into SQL anymore.
Make T-SQL less verbose. Give me NATURAL JOIN, complete OVER support and make ASSERTIONS and DEFERRED TRANSACTIONS available. (If you agree with that, please make Microsoft aware of it, voting connect feedback here and here)
Huge scalability is on its way with Madison, so maybe here we’re half the way through.
The conclusion, at the end, is that we don’t need to kill the relational model. Instead we "simply" need to have its implementation made better and better. That’s my idea. Do you agree?