Helping ordinary people create extraordinary websites!

Stored Procedures are EVIL

By Tony Marston
2006-09-07

Stored procedures take longer to test
Business logic in stored procedures is more work to test than the corresponding logic in the application. Referential integrity will often force you to setup a lot of other data just to be able to insert the data you need for a test (unless you're working in a legacy database without any foreign key constraints). Stored procedures are inherently procedural in nature, and hence harder to create isolated tests and prone to code duplication. Another consideration, and this matters a great deal in a sizable application, is that any automated test that hits the database is slower than a test that runs inside of the application. Slow tests lead to longer feedback cycles.




Tutorial pages:
 4 Votes

You might also want to check these out:


Leave a Comment on "Stored Procedures are EVIL"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS