Re: Replacing WebSQL with a Relational Data Model.

Sure, the argument has more weight with real numbers. I have started working
on the relational schema model in JavaScript.

Here is a question:

What is preferred in terms of style for declaring a relation. We can have
something like:

    var FarmTable = {
        id: {name: 'id', domain: FarmId, type: rdm.schema.serial},
        name: {name: 'name', domain: FarmName},
        county: {name: 'county', domain: FarmCounty},
        owner: {name: 'owner', domain: FarmerId}
    };

This is concise, but little checking is done, alternatively:

    var FarmTable = new Relation(
        new Attribute('id', FarmId, rdm.schema.serial),
        new Attribute('name', FarmName),
        new Attribute('county', FarmCounty),
        new Attribute('owner', FarmerId)
    );

Or perhaps something else?


Cheers,
Keean.


On 27 October 2010 09:24, Jonas Sicking <jonas@sicking.cc> wrote:

> On Wed, Oct 27, 2010 at 1:04 AM, Keean Schupke <keean@fry-it.com> wrote:
> >> So, my point was that although IndexedDB is neither optimal for your
> >> preferred data model or mine, it does cater for us both, and everybody
> else,
> >> allowing us to get on and do our jobs, implement APIs, and build HTML5
> >> client side web applications.
> >
> >
> > This is where we differ, as I think it may allow it, it will not make it
> > practical (from the programmers point of view) nor usable (from the end
> user
> > tying to use the app).
> > Remember we have to perform reasonably against native iPhone / Android
> apps
> > or people will not use HTML5 apps.
>
> I'd encourage you to do some testing, run some performance numbers,
> and report back for cases where things are too slow.
>
> That good performance is a required in order to consider a use case
> met is hopefully obvious to everyone here. The whole point of
> IndexedDB is good performance, other than performace it doesn't
> provide anything that localStorage doesn't.
>
> / Jonas
>

Received on Wednesday, 27 October 2010 08:34:03 UTC