[Tfug] Any SQL gurus out there?
Andrew Halper
andrewhalper at cox.net
Thu Oct 25 16:15:46 MST 2007
> Date: Thu, 25 Oct 2007 10:33:16 -0700
> From: Claude Rubinson <rubinson at u.arizona.edu>
>
> On Thu, Oct 25, 2007 at 12:55:45AM -0700, Jim March wrote:
> > In general terms, how common would it be to include "program code"
> > inside an SQL database? Wouldn't that be considered, at a minimum,
> > squirrelly?
>
> As others have mentioned, stored procedures are quite common and can
> be very important, frequently essential. If you're asking about
> storing code within a table/set of tables however--something that I've
> seen rather frequently--you DO NOT want to do that.
Usually I'd agree with that, however, there is one exception I can think of. The Ingres database stores database procedure code in the "system catalog", which is a schema of ordinary database tables with some special access constraints.
> People new to RDBMS frequently become enamored with the idea of
> flexibility and dynamically building everything--including the code
> needed for deploying, e.g., a website and, in extreme instances, the
> database itself. (I've read of databases which were populated with
> tables named "tables", "columns", "rules" which specified the database
> schema. That gave me nightmares for a month.)
Yes, I've seen similar things. The worst designs are usually the ones that attempt to make the data model too abstract.
Andy (Halper)
More information about the tfug
mailing list