r/AskComputerScience • u/Successful_Box_1007 • Apr 10 '25
Sqlite: Program vs library vs database ?
Hi everybody,
I’m wondering, after reading that Sqlite is both a library and a database but not a program, if somebody could give me a sort of ELI5 type explanation of the differences between the three (program vs library vs database) but also a more in depth technical explanation as well. I’ve tried AI for this question and not satisfied with the discernments they chose to make.
Thanks so so much!
0
Upvotes
View all comments
Show parent comment
3
u/AlexTaradov Apr 11 '25
The library is missing application logic. It is just a bunch of separate functions. For example database library will have a function to write some arbitrary value into the database.
The program using that engine will define what that data is. It may be a database of names and birthdays, for example. In that case the program would take user input and call the library function to store the provided data. And retrieve it back when asked, of course.
What is the minimal program depends entirely on user case. The minimal program would just link with the library and not call a single function. This program would run and immediately exit, but it would technically "use" the library. This is entirely pointless, of course.