Tim Burns' Weblog
 
Friday, April 9, 2004 [*]
 

Thoughts on Database Application Design

My views of database application design are always evolving. I am still a big fan of starting with a few simple tools and focusing on adding functionality. Now I'm using Oracle Application Server instead of Tomcat because it comes with Apache integrated and it seems a little faster. I was making a tongue-in-cheek remark when I advocated HSQL over Oracle and I hope that was obvious.

My biggest change in design philosophies in the past 3 years is my belief that stored procedures should implement business logic and the middle tier should really only implement logic that can't be expressed in PL/SQL. Stored procedures in PL/SQL allow you to support more kinds of clients and it always performs better. They also allow for more flexibility when it comes to maintaining the physical layout of the data. They aren't Object Oriented and it doesn't really matter, because the kinds of problems they solve - pure business logic problems - don't require Object Orientation.

There are, however, some pitfalls to using PL/SQL for everything. If you use PL/SQL as a wrapper for update or create statements that don't have any business logic involved, then you are introducing an unnecessary dependency. Generally you will deploy your Java application as an EAR file and the PL/SQL will be deployed separately. You now have the management problem of tracking the PL/SQL routine independantly of the rest of the code to make sure they are deployed together. Not a big deal, but a place where something can go wrong.

I've come to the conclusion that PL/SQL should be used if and only if a business decision needs to be made in some operation on the database.

 
Comments [0]
 
xml   Subscribe with Bloglines

Articles

Non-Blocking Socket I/O in JDK 1.4

Generating Entity Beans with XSL Templates

 

Photos

Morning of the Wolf
Phantom Farms
Providence
Baby Shower
Camden, Maine
 

The Daily Chronic

Brown News
Carl Zimmer
Dijkstra
Get Fuzzy
Instapundit
Kevin Drum
Late Night Hacking
Mark Rittman
Mike Shoemaker
Philip Greenspun
Salon
Signal+Noise
Steve Button
Weiqi Gao
Woods Hole News
 

References

BioInformatics

BioTech

Epicurious

Statistics

 

Archive

2004
 April 01 04 07 09 11 16 17
 March 02 15 21 22 24 27
 February 13
 January 04 16 19 29
2003
 December 06 12
 November 02 23 29
 October 07 11 12 16 18 21 24 26
 September 04 09 10 12 14 28
 August 05 08 13 17 18 25 29
 July
 June
2002
2001
 

Wiki

Creative Commons License
This work is licensed under a Creative Commons License