So I'm really digging using localStorage for web apps and it works great... if you need a key-value store. However, I also find that my storage needs include something that looks like database tables with primary key - foreign key relationships. I had hoped IndexedDB would shape up sooner, but I'm disheartened by the less-than-ideal solution for doing joins (see example 4).
I've been tempted to write a B+ tree backed by localStorage and deal with the indexing and joining myself; however, I feel that may be overkill for two reasons:
- It's reinventing the wheel, and likely to do it poorly.
- It's never going to reach the performance of a B+ tree implemented at the file level.
I've already read a ton of criticism of the IndexedDB API (again, mostly for the roll-your-own join operation). So, my question is, is there an API that's supported across the major browsers for storing tabular-ish data locally (like localStorage) that's specifically geared for correlating via indexes?
Just to set the tone here, let me be clear: I'm not really looking for a silver-bullet answer. I'm more looking to understand a little clearer what the state of the art is.