4 ms·
What is a browser database and what is it good for? Would you use one instead of a back-end DB or in conjunction with one? How? Why? Why is this on 1st page - w
by jdimov9 11y ago
What is a browser database and what is it good for? Would you use one instead of a back-end DB or in conjunction with one? How? Why? Why is this on 1st page - what is cool about it?
I'm clearly missing something, but I can't be bothered to watch the videos - can someone TL;DR it for me, please.
- rglullis 11y agoOffline-first web apps. Think of all of the "native mobile apps" that could actually be done as a web app, but instead get built as native applications just because the application needs to store data.
- zzzmarcus 11y agoAlso Electron apps. It's currently pretty painful getting sqlite working with Electron, this could be a nice alternative.
- beefman 11y agoHave you tried the emscripten port of SQLite? It's worked well for me... http://github.com/kripken/sql.js http://github.com/kripken/sql.js
- zzzmarcus 11y agoI've tried it, the main problem I have withe it is that the whole DB has to be loaded into memory. It seems like it would be slow and unwieldy with even a moderate sized database. I'm still keeping it open as an option, but I like that Lovefield uses indexedb under the sheets.
- neilellis 11y agoIt's like having PouchDB -> CouchDB but with SQL not NoSQL For me I'd like to: Firebase as backend. Sync user data to browser. Query user data elegantly in browser using select statements.
- Argorak 11y ago> It's like having PouchDB -> CouchDB but with SQL not NoSQL Also, without the replication and conflict detection.
- ysh7 11y agoBetter way to describe it was "like SQLite"
- deleted 11y ago[deleted]
- marknadal 11y agoHave you seen http://gunDB.io http://gunDB.io (disclosure: I am the author)? It has what you are describing. As well as replication and conflict resolution that the other commenter mentions.
- DCoder 11y agoWe have a web app that downloads a large list of simple repetitive maintenance tasks ("check amount of spare printer toner", "water the office plants", and such) with documentation, images, etc. that need to be performed regularly, and then shows the user that list so he can perform the tasks and send back the results. Some companies using this app do not allow internet access in the specific areas where tasks have to be performed, so some parts of the app have to work without it. Business requirement was "store enough info on the device to be able to run without internet access for one month". Without an in-browser persistent database (we used WebSQL, with all the future risks), it would require some interesting workarounds (can you serialize multiple megabytes to local storage? how long will it take? will it rollback from a fault correctly?) or Phonegap type solutions.
- toddchambery 11y agoI implemented a character manager using TaffyDB[1], loading lots of static data upfront. Made calculations using cross "table" lookups much simpler from a coding perspective. [1] http://www.taffydb.com http://www.taffydb.com
- aggronn 11y agoAny data-heavy applications that have significant grouping/filtering/etc.. SQL is very powerful, and when you try to work with large datasets in the browser, its kind of disappointing that you have to either transfer a lot of data on every data view change or do SQL's job with lodash collection methods.