• RonKyle (8/21/2013)


    I favour moving as much application business logic into stored procedures as is possible, thereby abstracting out the UI layer from the business logic

    I think I can help with wondering why it's not in wider practice--this is not a good idea. The database is a chokepoint, and you want it processing as few business rules as possible. The enforcement of business rules really belongs in the middle tier, whatever that might be for the application. Let the code in the intermediate levels do their thing and then send the result to the database.

    What, so you think we should maybe have tables that conform to 1NF, but normalisation to 2NF or higher is always a mistake, because only business rules can tell us what dependencies there are between different parts of the data and normalisation is all about ensuring that those dependencies are enforced by the database, and enforcing business rules in the database is anathema?

    I thought that that attitude to business logic had become utterly unpopular about 40 years ago and no-one held it today, but you are showing me that I was absolutely wrong about that.

    Tom