Riley Major

Camp Counselor

Write More Testable T-SQL

Event Logo

Wednesday, July 31, 2024 - 7:30 PM UTC, for 1 hour.

Regular, 60 minute presentation

Room: African 50

SQL

If you've worked with a legacy business application, you've probably encountered database stored procedures, and they've probably been a fragile, scary mess. They typically have hundreds of lines of procedural code with many branches, convoluted logic, and overloaded variables. And there's no way to test anything because running the procedure makes all sorts of changes. You might think that's just the way things are done in a database and there's no fixing it. But I can tell you there is a better way. You can move all of that logic into composable, testable components. You can test your code without risking any data modification. You can even quickly generate thousands of tests which will show the business exactly how your code will behave in every conceivable scenario. Once you experience SQL done right, you might even grow to like it.

Take Aways

  • Learn to encapsulate business logic.
  • Learn a method for mass testing of business logic.
  • Learn to make more reusable, composable database code.

Supporting Resources

favorited by:
Adam Kerr Will Boyer Jacob Netz William Schaeffer Elizabeth Groom Josh Kinstler Jason Von Ruden Matthew Ives Carlos "El Guapo" Porras Rodriguez Michael Duren Jesse Dahir-Kanehl John Martin Brett Allenstein Kevin Curtis Riley Major Spenser Austin Caleb Autry Adam Tegen Dan Willman Jordan Bleu