One of the main differences is whether you write “one true interface” or whether the center of your application is a database.
If you have several stored procedures at the front end, this makes a lot of sense because you reduce maintenance overhead. If you write only one interface, stored procedures are a pain because you lose a lot of flexibility when changing the data set, because you need to change the external interface, and now you need to perform code maintenance, version control, etc. In two places, Databases are a real pain to keep in sync with code repositories.
Finally, if you are encoding multiple databases (e.g., Oracle and SQL compatible code), I would completely avoid stored procedures.
You can, in some rare cases, after profiling, determine that some limited stored procedures are useful to you. This situation occurs less than people think it does.
Plynx
source share