Re: Replacing WebSQL with a Relational Data Model.

>
> Why would LocalStorage be involved at all?  Just keep the data in an
> ObjectStore.
>


Sure, why not. I guess this is an SQL habit. Generally I don't put large
blobs of data into the tables. The point being if its not going to be part
of a query why is it in the table?  With a relational database the rows are
stored sequentially (indexed are external and only apply to some columns),
so scanning is faster (for example summing a value across all rows can do a
streaming read of the table so is faster than tree walking a B-Tree index),
but a large blob in each row would result in more disk seeks.

This kind of single access pattern is not really a database at all, and is
ideal for an IndexedDB implementation. Where the relational model, and SQL
come into their own is where you have several different queries with
different access patterns that all need to be fast.


Cheers,
Keean.

Received on Wednesday, 27 October 2010 10:43:19 UTC