Dataphor SQL RAC (Relational Application Companion)

A site of hope for those looking for a true relational database system

Wednesday, July 16, 2008

Demoralization by trigger

In an interesting blog by Conor Cunningham, 'The Trouble with Triggers', he says:
"The problem with this area is that there is a great temptation to think
 about databases procedurally, as you would with a programming language
 like C++ or C#.  You can write code that looks like a procedural function
 call and have it get called for each insert into table!  Before you know
 it, non-database programmers are checking in code to your production sysem.
 Suddenly, your application grinds to a halt because a trigger plan has no
 index or is poorly designed.
 Databases are great tools for working on SETS of rows."

In another related blog, 'Triggers...Evil?', there is this comment with an 
insightful Freudian slip:

James Luetkehoelter said:
>Some sorts of demoralization lend themselves to triggers...

I would say this hits the nail on the head. I could understand a developer
getting a case of depression triggered by Conors article. Triggers were
'implemented' to work efficiently on tables (sets) not on rows. The principle
that's operating here is that how something was implemented to be most
effective is the basis for what's best in application development. Are you
kidding me, has everyone gone nuts?  Because triggers don't consider a row
as a primary concept 'functional' programmers, application developers, must
'unlearn' their database contrarian views. This is Celkos 'them' vs. 'us' 
nonsense. Never mind that the real subject is application development and
possibly a theory that would best serve it, the basis for key concepts is 
what a bunch of programmers did for a MS product manager. Talk about the
tail wagging the dog  Not only is the absence of a 'row' type or at least
concept antithetical to a relational dbms but it's central to application
development. Perhaps to even the score MS decided developers should learn
entities and unlearn sql entirely, LINQ. Or perhaps we'll get a hole new
science of application development based on what works fastest 


Luxspes said...


I just wanted to say that I enjoy a lot reading your blog, and I also think that Dataphor (or something like it) will hopefully replace current pseudo relationa technology with true relational technolgy.

On the other hand, I have to admin that the layout of you blog is a little ankward, I hope that you take no offence if I suggest you to change it, I think it would be easier for me (and others that might visit your site) if you used, for example the "Minima Strech" template.


(Sorry for posting twice, I got a little confused and posted this in a another very old article you wrote)

Steve said...

Hello Luxspes,

Thanks for dropping by. Feel free to comment on anything pro or con or suggest a topic. I'll see what I can do about changing the layout :)


About Me

My photo
Phoenix, Arizona, United States