Data is Sacrosanct

Posted July 20, 2009

I've often voiced my distaste for how older versions of MySQL didn't support referential integrity and how many database frameworks fail to accommodate it in the database layer, either. I know that some try to handle it within the framework itself (such as Ruby on Rails' ActiveRecord) but they all miss the point.

First of all, the whole point of a RDBMS is to let the database do the grunt-work. This is often something overlooked or ignored by PHP or Ruby programmers, even going so far as to do the sorting themselves. Good RDBMS engines are designed to do this faster than your application layer can. If all you want is someplace to put data, why bother with a RDBMS at all? Just go to plain old text files!

My ultimate issue is that the data in your database is sacrosanct - it should be as difficult as possible to place garbage data in your database. You must always assume that some upper layer is going to crash and burn, and try to mangle your database. This is why ActiveRecord's controls are beyond stupid. Ruby on Rails development has taken the position that the framework is God, and must do everything. This is so far off the mark, and it's provably wrong. At my place of work, we have seen so many places that we have garbage information in the database that model rules expressly forbid, and yet there they are.

One cannot also make the assumption that only one point of entry will EVER exist into the database. This is such a classic Ruby on Rails position, which can clearly be seen in every aspect of the entire framework. Absolutely everything is so "Ruby" and so "Rails" that even the concept of something else being involved in the database/application in any way had never entered anyone's mind.

This re-enforces my opinion that Ruby on Rails simply isn't "enterprise" enough. A truly massive, robust enterprise solution has to consider severe crippling events - for an RDBMS this means transactions and integrity checks. Without that, you can never be sure of your data's viability, and that is simply non-negotiable in a corporate environment.

Comments

There are no comments for this post.

No comments found

Add comment

Visit my Friends and Family

If you've enjoyed my site, please take a moment to visit my friends and family, many of whom have some interesting insights, and entertaining thoughts and ideas.