Re:Code in Database vs. Code in Application
by leo_lightmeter on Monday July 11, 2022 @02:26AM
(#32052872)
Interestingly when one uses SQLite (or virtually any embedded/serverless[1] database engine), the code is always executed within the application process, regardless of being written in pure SQL of by the hosting language, making the dichotomy irrelevant.
Not having support for stored procedures can be used by some as an argument against SQLite, but the fact is that store procedures conceptually make no sense in embedded databases if you can extend the query language with the host code.
One big issue I've seen on SQLite is that if you add an index or view on an expression which uses code from the host process, no other application will be able to read data from the database file, unless you have such code in an extension that can be read by such applications.
Not having support for stored procedures can be used by some as an argument against SQLite, but the fact is that store procedures conceptually make no sense in embedded databases if you can extend the query language with the host code.
One big issue I've seen on SQLite is that if you add an index or view on an expression which uses code from the host process, no other application will be able to read data from the database file, unless you have such code in an extension that can be read by such applications.
[1] https://www3.sqlite.org/matrix/serverless.html