Monday, October 17, 2016

A screen door on a stored procedure is not as silly as a screen door on a submarine.

Instead of having one sproc which gets a bunch of cats by int key and another that gets the cats by varchar special name identifier, it is best if there is one sproc with some complicated front door logic (if not null for one, then find the other) to keep the sprocs from being copied into two places and requiring logic that trickily will need maintenance in two places when the Cat table gets a new column. Meow!

No comments:

Post a Comment