Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)
Date: 2 Jun 2006 10:32:10 -0700
Robert Martin wrote:
> I want the application to be isolated from the DB;
If you mean from the DBMS itself, then I agree. If you mean from the data model, that's a different story. Given that a shared database supports multiple applications, and given that it has sufficient constraints to ensure that Application A can't corrupt some of the data used by Application B, why on earth would you go to the trouble of contorting each application to use a restricted form of the data?
> and I
> want the DB isolated from the application.
That makes sense whenever the DB supports multiple applications, which is nearly always (I'll assume each business function's screens constitutes an application, as does each reports, batch programs, etc.)
> I wan't the application
> programmers to be able to change from Oracle to MySQL to Flat files.
Why? This is a lot of work, work which is neither rewarding nor utilized in most cases. A nice pie-in-the-sky desire, but... ugly. Those various "data sources" are very, very different in capabilities and nature; orders of magnitude more different than the differences between Java and Python (for example).
> I want the DB to have the freedom to support Java, C#, C++ or Python.
Most of them already do, and note that adding a JDBC driver for a new DBMS is something that need be done only once, and it will work for every Java application which uses that DBMS.
Piling additional applications, and integrations with systems written in other languages, is common. Swapping out the underlying data store that multiple applications rely on? Mostly pointless.
> Note the symmetry.
Useless, in my opinion. Symmetry for its own sake?
Why don't we make all our sentences palindromes?