In a post on Mozilla’s hacks blog, Arun Rangatharan and Shawn Wilsher give a clear and compelling walkthrough of IndexedDB, a feature coming in Firefox 4. IndexedDB is their answer to the need for more powerful client-side data storage. Many browsers already support localStorage but that is just a persistent map. It only stores name-value pairs and doesn’t provide any kind of index support for faster look up over larger data sets. Mozilla has decided to eschew another effort in this arena, the WebDatabase API. That API is currently implemented by other browsers and is based on and a subset of the popular SQLite file database.
I don’t even have to read the post they link to explaining the reasons, looking over the code samples they provide for comparison has convinced me that IndexedDB is appealing. The choice between the two mirrors very strongly the calculus around selecting server side database these days, too. There may well be some kinds of data for which a small relational database makes sense but the ease of programming speaks well of the more JSON-like IndexedDB. I doubt any of the advantages of SQLite will make much of a difference on the scale at which these APIs will be used.
My only concern is cross browser support. IndexedDB was a draft spec before Mozilla started implementing it for the forthcoming version of their browser. In that post on reasons for supporting it, they do note their is support from Microsoft and some implementation of the structured storage system for Chrome. Here is hoping we can avoid having to have abstraction layers or wrappers as crappy compromises for it not making it into all the modern browsers.