Back To Basics: Functions, the good and the bad

Functions are create little blocks of code. They are fantastic for converting data from one format to another, or for looking up other values based on a lookup. However this comes at a price. That price is CPU power. Doing all these additional lookups can cause extra strain on the database server. It’s often better for the database server to simply join to the table which you are doing the lookup against. However you can guarantee the same lookup is done every time when a function is used.

Back To Basics: Stored Procedures, the work horse of the database

Stored procedures are extremely useful objects. Not only do they store T/SQL scripts for later execution, but they also provide us with an extremely important security barrier between the user interface and the database. The security barrier is used to prevent the users from needing SELECT, INSERT, UPDATE and/or DELETE rights directly to the database tables and views.