Re:SQLite the only database you will ever need in most cases
by ngrilly on Thursday April 15, 2021 @10:36AM
(#26821039)
You don't really need v8 JavaScript functions built-in in the database when you use SQLite, because SQLite is running in the same process than your application. The round trips between your application and SQLite cost almost nothing.
Also see "Many Small Queries Are Efficient In SQLite": https://sqlite.org/np1queryprob.html
Re:SQLite the only database you will ever need in most cases
by NicoJuicy on Thursday April 15, 2021 @11:00AM
(#26821288)
I was literally talking about using v8 functions when managing data ( eg. updating event versions should be a clear use-case)
Round-trips and small queries don't have anything related to my comment?
Re:SQLite the only database you will ever need in most cases
by ngrilly on Thursday April 15, 2021 @01:17PM
(#26823381)
Since SQLite is embedded in your program, why not use your programming language directly. SQLite can even callback in custom functions you define. For example in Python: https://docs.python.org/3/library/sqlite3.html#sqlite3.Conne....
The main reason why main client-server databases have so many built-in functions is because of the round-trips. Let's say you want to filter rows based on the result of some function, if your function is implemented client-side, then the database would have to send each row to the client.
"Relational database engines act as bandwidth-reducing data filters." (https://www.sqlite.org/whentouse.html)
Re:SQLite the only database you will ever need in most cases
by NicoJuicy on Thursday April 15, 2021 @01:33PM
(#26823600)
I didn't consider it that way, thanks.
But while you need to do everything with a JSON1 extension for managing the json ( https://www.sqlite.org/json1.html ).
Postgress has build-in v8 javascript functions to manage this ( as stated before). Which makes it much more useable.
There's a good library for .net that handles postgress documents, which has an insane amount of usefull functions ( https://martendb.io/documentation/documents/ ). I think halve of those wouldn't be possible on another database.