The other day I had another conversation about the business logic with one of our new managers.The good thing – since we were writing another paper, I’ve just reviewed my “split logic” principles and explained it to two of my other co-workers. So I was ready to explain it again.
But I keep wondering, why people are so scared to have “a business logic in the database”? At the end of the day we have multiple applications accessing one database. The database is “more permanent” than the app. The same data can’t be processed using “two different logics”. Isn’t it quite natural, that the business logic actually should be reflected in the database?
Another thing is the fear that the code, which is stored in the db in form of functions, is somewhat different, that just “a code”. Which leads to another scare – that when something is stored in a database, it becomes a black box. I am not sure how to fight those phobias, but I am pretty sure that they do us a disservice, because those are phycological, not logical, and even more not technical reasons to reject the better performing solution… The more I think about it, the more I agree with the statement, that impedance mismatch os more cultural, than anything else…