Accessing IndexedDB with DexieJS in the web worker
IndexedDB is a very powerful key-value database; however, the native implementation provides an API that is rather hard to handle. The actual recommendation is not to use it but, instead, work with it through a framework or library. The database engine is fast and very malleable, so multiple libraries have built upon its foundation and recreated functions and features not present originally. Some libraries even mimic SQL and document-based databases. Some available and free-to-use libraries are the following:
- DexieJS (https://dexie.org/): A very fast and well-documented library that implements a NoSQL document-based database.
- PouchDB (https://pouchdb.com/): A database that mimics the functionality of Apache’s CouchDB and provides built-in synchronization with remote servers.
- RxDB (https://rxdb.info/): This is a database that implements the reactive model. It also supports replication to CouchDB.
- IDB (https...