Use stored procedures for business logic and security

Some developers only allow database updates via stored procedures, so direct access to the data tables is prevented. This is often a requirement of off-the-shelf applications, which have a published API.

Stored Procedures can be used for business logic. They can be used to check that an update is valid, for example that a salesman has the authority to offer a discount, or that the status of a purchase order can only be changed according to a fixed workflow.