Re: No knowledge of the database?
From: Fredrik Bertilsson (fredrik_bertilsson_at_passagen.se)
Date: 01/02/04
- Previous message: Isaac Gouy: "Re: Modularity Again (Was: Real world musings)"
- In reply to: Ron Jeffries: "Re: No knowledge of the database?"
- Next in thread: Alfredo Novoa: "Re: No knowledge of the database?"
- Reply: Alfredo Novoa: "Re: No knowledge of the database?"
- Reply: Robert C. Martin: "Re: No knowledge of the database?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 1 Jan 2004 21:58:30 -0800
Hi Ron,
I see that we agree that "the source code and the database structure
are tangled together and will have to be changed together".
You say that you want as less coupling between the application and the
database and that you use the database "much more as a data repository
and retrieval mechanism". What do you mean with this? Do you still use
database constraints like primary and foreign keys?
I agree with you that most often the primary task for the DBA is to
resist database changes, but that is only a fact after the system has
entered the production phase and it contains data. In the development
phase it is very easy to change the structure of the database, or? But
in the production phase every change (except of adding tables and
columns) will mean that you have to convert the old data, but I don't
see how you can avoid that with less coupling between the application
and the database? Do you mean that the application should be changed
but not the database?
Finally another view. At my company we have tried really hard to make
a object model on top of the database model. But after two years we
have ended up with doing one java class for every table. All other
attempts of O/R mapping has failed. In my view there are very few
examples of where another O/R mapping stategy could be logical. The
conclusion is that if we should have generated java classes from the
database structure (with Torque or something similar), and accepted
the database structure, we should have saved a lot of time.
Best regards,
Fredrik
Ron Jeffries <ronjeffries@REMOVEacm.org> wrote in message news:<jcb8vv420o2fiko5dgd180m9997ga808op@4ax.com>...
> On 1 Jan 2004 04:04:21 -0800, fredrik_bertilsson@passagen.se (Fredrik
> Bertilsson) wrote:
>
> >I have worked with many information systems (production control,
> >logistics, human resouce etc) with java and VB as programming
> >languages. But in all cases a good knowledge of the (relational)
> >database structure is absolutely necessary for every programmer (even
> >client programmers). Are there anybody here on this forum that develop
> >information systems and don't know about the database structure? If
> >yes, how do you do if you have a system failure due to wrong data, and
> >the data in the database has to be corrected. Do you call someone else
> >that knows about the database structure?
>
> In fact I happen to know a lot about database, having implemented a few
> relational database systems in the past. And I find that the less coupling there
> is between the logic of the application and the logic of the database, the
> better applications that use database tend to work.
>
> A digression: What's interesting to me as a database guy from the past
> is that this is largely because of some significant failures in the database
> systems of today. Codd's original vision for RDB, and the vision of many of us
> around that time, was that RDB would provide for an /independence/ of the
> application upon the data. We were supposed to be going to get RDB systems where
> /information/ could be put into them, and through setting up views and indexes
> the like, access to the database could be both flexible and efficient. While the
> RDB systems of today are quite complex and quite marvelous in their way, they
> are emphatically not flexible. It often seems that the DBA's primary job is to
> resist changes to the database.
>
> The best way most of us have discovered to do agile development in the presence
> of a database is first, to defer use of the database as long as possible, in
> order to better discover and evolve the appropriate shape of the program as
> directed by the business requirements, and second, to use the RDB much more as a
> data repository and retrieval mechanism, that as a means of executing
> business-related processes.
>
> >My second question is: Are there anybody on this forum that have
> >experience from changing the database structure without major changes
> >in the source code, not just the data access layer? If yes, I would
> >really know how to do?
>
> It is doable, and I have seen it done at a small scale. The primary means is
> abstraction. It helps a lot if the practice I describe above is used, where the
> program's view of the data is made the focus of the programming, rather than
> allowing the RDB's view of the data to "contaminate" the logic. Once the RDB's
> view and the program's view are intertwined, the source code and the database
> structure are tangled together and will have to be changed together, forever
> after.
>
> In general, though, it is a hard problem, since there are some aspects of the
> logic which are easy to express in the RDB, and others that are required to be
> expressed. Yet the RDB languages themselves are not amenable to doing the whole
> application -- thus the great proliferation of real programming language
> programs accessing RDB -- and the RDB languages themselves, with extremely low
> support for modularity, for testing, and for refactoring, are not very amenable
> to agile use.
>
> Regards,
- Previous message: Isaac Gouy: "Re: Modularity Again (Was: Real world musings)"
- In reply to: Ron Jeffries: "Re: No knowledge of the database?"
- Next in thread: Alfredo Novoa: "Re: No knowledge of the database?"
- Reply: Alfredo Novoa: "Re: No knowledge of the database?"
- Reply: Robert C. Martin: "Re: No knowledge of the database?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|