По поводу такого подхода к архитектуре приложений подобного класса http://ledgersmbdev.blogspot.ru/2011/10/introduction-to-soda.html
Небольшая цитата для затравки:
SODA is an approach to database design which supports the idea that the database should be sufficiently semantically rich to provide code generators everything (in the model side of an MVC framework) they need to interoperate with the database. Objects and classes are, to the extent feasible, defined in the database and exported to applications, rather than defined in applications and mapped to relations using ORMs. In a perfect database implementing SODA, it would be possible to run a code generator in a language of your choice, and have it define classes and methods based on database types and stored procedures, which could then be used by your application quickly.
// LedgerSMB: Open Source ERP