I once read an article that promoted putting all of your business logic in the database, in the form of stored procedures, functions, etc. I thought the author was completely insane, until I kept reading. "You can change frontends any time you want, or you can run multiple frontends simultaneously. Everything important, including validation, is handled by the database." Have I done it? No... but that opened my mind to a new way of thinking.
My experience with this at one company is the DB became a wild west of cowboyed sprocs that were in source control but a lot of times the sproc in the db didnt match the stored code. It became a way to skirt code reviews and push changes fast. Now, the environment was toxic to begin with, and maybe that wouldnt happen on a project with better technical leadership, but there is a lot of wiggle room for hanky panky at the db level
> You can change frontends any time you want, or you can run multiple frontends simultaneously. Everything important, including validation, is handled by the database.
Or you can properly architecture your application and move the logic layer to a language with better tooling.