More on databases and business logic

This particular entry in the “forever war” of whether to use object-relational mapping or stored procedures does a better job than most in these ways:

  • It changes the argument from “either-or” to a situational one.
  • It broadens the scope of database objects in the discussion beyond stored procedures to include functions, triggers, views, constraints, and referential integrity.
  • It rates the suitability of each database object to a particular task.

I found the article especially relevant to my current job because of how many projects I’m responsible for that have huge amounts of business logic captured in stored procedures hundreds of lines long.  As far as I can tell, much of the reason for the length of these stored procedures is that they’re being used to represent workflows.  SQL doesn’t look like the best way to implement those to me, so I suspect I’ll be looking at Windows Workflow Foundation a lot more closely in the very near future.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.