[thelist] Separation of app & db (was: Beginner asp question)

Steve Cook steve.cook at evitbe.com
Thu Oct 17 08:10:05 CDT 2002

This is the stuff we pay you for Rudy!

I've been mulling over just this point lately and your tip is really
provoking some churning of the brain muscles. I am at heart a very
procedural programmer. However I lean more and more on using the database to
order my results for me. In the last week I've been working on a query to
assemble some statistics from a grat many results in a booking application.
I won't go ito details, but I've solved the problem in two parts using views
in MS SQL2K. The first view links together various values in relational
tables and the second collects total values of sales from the first view for
each type of item available.

What I've been pondering over is that I have now rewritten this in 3
different ways. If I were using procedural code (vbScript in ASP pages) I
would have a gut feeling for which method is most effective. However in the
database there is so much that is going on "behind the scenes" that I find
it very difficult to gain a feeling for which solution is best. I can time
queries, but beyond that I always find I have a sneaking feeling that I
could have done it better.

What this leads me to is whether it is always better to use the database, or
whether the advantage of clearly-read procedural code is worth a performance
hit (within certain bounds).

Is this heresy, or do others find a similar problem?


 Cookstour - http://www.cookstour.org

> -----Original Message-----
> From: rudy [mailto:r937 at interlog.com]
> Sent: den 17 oktober 2002 14:50
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] Beginner asp question
> with database-drive web sites, a similar objective in
> development should be
> the separation of application and database, such that there
> is no logic in
> the application to deal with record processing

More information about the thelist mailing list