J. Merrill wrote (in part):

> One technique I've used successfully, but have not seen discussed here, is that of 
> having
> application code that generates the code for stored procedures, triggers, and views. 
>  Sometimes,
> that code will be "constant" -- but much of the time, it will vary based on column 
> datatypes.

That's pretty interesting.  I've done the same thing for self-installing applications 
that create
their own databases at runtime, but never for anything else.  I can imagine several 
situations in
which it would be nice for an application to realize patterns of heavy use and create 
stored
procedures to address at least those, even in situations like Frans talks about.

> I could give some real-world examples of where this has seemed to be the only 
> reasonable
> solution, if anyone cares.

Shoot!  This email stuff is still tax-free.  :O)  I, at least, am very interested.

> It does threaten the job of any DBA who can't (or won't learn to) write application 
> code, or
> can't get his head around the schema-definition mechanism the application uses to 
> maintain the
> extra information needed by the code-generating code.

Yep, yep.

I think that all of these issues also have different answers depending on who's using 
the
database.  For instance, sometimes a DBA <i>has</i> to keep reins on schema changes, 
because a
database is used directly by other applications.  In situations where a database is 
created
specifically for one application, I'd see my way clear to a much more loosey-goosey 
approach, even
leaving out all constraints (even {gasp} foreign key constraints) in the interests of 
speed, if I
had complete faith in the application code.  Speed is almost always one of my top 
concerns; I'm
just a freak like that.

Jeff

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to