Question
Is Node-SQLite necessary when working with a database and Node?
Answer
No, it is not a required library. There are other libraries that interact with different SQL database management systems, for example, MySQL and PostgreSQL. Yet, SQLite has an advantage in development and that is its lightweight scale since it does not have a “client-server” relationship, that is to say, it is not stored in a server but as part of the app which is why it calls itself “self-contained”.
Node-SQLite is simply a library that saves us tons of time by giving us methods that can help us directly open and close a connection with the database and send as well as manipulate the data queried through hooks and callbacks. We could do the same with regular JavaScript, but even though the library is not necessary at all, it gives us the necessary tools to work with the SQL database without spending time into setting up the connection or writing any methods that could successfully send out the query in a way that SQL understands.