As someone who has extensively used/abused IndexedDB in the development of <a href="http://basketball-gm.com/" rel="nofollow">http://basketball-gm.com/</a> I can say that I'm really happy to see some serious libraries built on top of IDB. Years ago people said "yeah, it doesn't have all the features of Web SQL, but you could build something like that on top of it" but now that's finally starting to actually happen.<p>Other cool IDB projects are YDN-DB <a href="https://github.com/yathit/ydn-db" rel="nofollow">https://github.com/yathit/ydn-db</a> which continues to develop and Dexie <a href="https://github.com/dfahlander/Dexie.js/wiki/Dexie.js" rel="nofollow">https://github.com/dfahlander/Dexie.js/wiki/Dexie.js</a> which is also new.<p>I hope that some time in the near future I can stop writing ugly hacks in raw IDB to account for missing database features and browser incompatibilities. But I worry about losing performance if I delegate too much to one of these libraries (although I haven't really started seriously testing them yet).
This documentation page is an excellent overview for anyone who wishes to understand how a declarative language such as SQL is actually translated to an execution plan behind the scenes:<p><a href="https://github.com/google/lovefield/blob/master/docs/dd/05_query_engine.md" rel="nofollow">https://github.com/google/lovefield/blob/master/docs/dd/05_q...</a>
<a href="https://github.com/google/lovefield/blob/master/docs/dd/04_cache.md" rel="nofollow">https://github.com/google/lovefield/blob/master/docs/dd/04_c...</a><p><i>Lovefield has an in-memory row cache, which is conceptually a big map of row ids to rows (and that is why Lovefield has unique row ids across the board). Currently the cache is a "dumb" cache: it contains exact duplica of what are persisted in the IndexedDB. The reason for doing that is to workaround IndexedDB inefficiency of handing bulk I/O, as described in backstore section. By caching all rows in memory, Lovefield avoids any additional round-trip required to load data from IndexedDB, with the price of memory usage.</i><p>How does that handle the case where the user has the app open in two tabs? Is there any synchronization?
SQL-like? How about your use a real SQL used in SQLite, <a href="https://github.com/kripken/sql.js/" rel="nofollow">https://github.com/kripken/sql.js/</a>
Here is a nice collection of node.js / browser stuff that wraps around IndexedDB / LevelDB / WebSQL and is mostly compatible with one another.<p><a href="https://github.com/rvagg/node-levelup/wiki/Modules" rel="nofollow">https://github.com/rvagg/node-levelup/wiki/Modules</a>
Now they only need to add a "commitToServer()" feature that uses some diff since the last commit and we got a stew going.<p>That tech is promising though, I like that we're opening new possibilities all the time.