Pacharapol Withayasakpunt Pacharapol Withayasakpunt
Wed 17 July 2019
Various Node.js sqlite packages. What is the best?

Various Node.js sqlite packages. What is the best?

The official implementation is actually sqlite3, and there are at least 2 packages built on top of it -- sqlite and TypeORM. There are also other packages that can run SQLite including better-sqlite3 and sql.js.


  • Easy to write / maintain
  • Client-side / browser only
  • Fast
  • Electron.js-enabled

In my experience, it seems that, in Node.js environment, Promise-based sqlite seems the be the best. Also, being-based on sqlite3, it works well with Electron.js (better-sqlite3 does not work well with Node.js. sql.js of course works, but it is not truly file-based.)

However, better-sqlite3 claims to be faster than sqlite...

Being a TypeScript user, I am looking forward to try out TypeORM sometime.