← Back to context

Comment by jcmontx

9 hours ago

I hated debugging and fixing stored procedures for legacy 2000s apps in de 2010s. The SP code wasn't treated like regular code, it wasn't source controlled. Mostly bad memories from having business logic inside the DB instead of having it all inside the code.

I have the same memories from many years of working with stored procedures - although you should certainly have been using source control.

But nothing quite matches the satisfaction of someone in a far off engineering group reporting a problem that prevented them from committing data that would have corrupted the database - because your referential integrity constraints protected the database.

In the age of AI and a massive explosion of code touching the database, maybe it makes even more sense to embed logic and constraints inside the database where there's no way to get around them.