• SAM (9/25/2008)


    Dennis Miller (12/24/2007)


    I understand the work around, but it seems to me to be exactly that. I can't help but think the logical design is flawed in some way that leads us to that point.

    The flaw is in thinking that this business rule should be handled at the database layer. The data integrity is ironclad without introducing the new table. The application layer should enforce the business rule. Pass species to a stored proc and get your list of vets, or work with the view!

    Why introduce a procedural solution to a problem that can be handled declaratively? Procedural solutions are more complex, more difficult to decypher and maintain, are often less performant, and are more likely to contain bugs.

    Furthermore, any business rule which constrains "persisted data" that is enforced outside the database exclusively should be considered suspect. There are too many ways around them at that point -- most notably when Developer B implements some CRUD operations in a new application or app module without the knowledge of the business rule buried in Developer A's implementation.

    TroyK