Use stored procedures

Some people complain about stored procedures as bad because they inject business logic into the database.
My answer to this is that then the stored procedures are used the wrong way.

Stored procedures should be used to get data in and out the database.  Used this way they represent the holes in and out of the database.
Name the stored procedures cunningly and you have an easy way to find the only ways to insert data into the customer table, the only way to update the order table and only ways to select multiple rows from role.

I have not found the perfect naming scheme.  Anyone?

Leave a Reply