W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: [IndexedDB] Compound and multiple keys

From: Jeremy Orlow <jorlow@chromium.org>
Date: Fri, 21 Jan 2011 09:41:33 +0000
Message-ID: <AANLkTi=xw9y89F1vnWV9y_YJYymhd4i9D5ckWRdD_HCZ@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Keean Schupke <keean@fry-it.com>, Jonas Sicking <jonas@sicking.cc>, Webapps WG <public-webapps@w3.org>
On Thu, Jan 20, 2011 at 6:29 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, Jan 20, 2011 at 10:12 AM, Keean Schupke <keean@fry-it.com> wrote:
> > Compound primary keys are commonly used afaik.
>
> Indeed.  It's one of the common themes in the debate between natural
> and synthetic keys.
>

Fair enough.

Should we allow explicit compound keys?  I.e myOS.put({...}, ['first name',
'last name'])?  I feel pretty strongly that if we do, we should require this
be specified up-front when creating the objectStore.  I.e. add some
additional parameter to the optional options object.  Otherwise, we'll force
implementations to handle variable compound keys for just this one case,
which seems kind of silly.

The other option is to just disallow them.

J
Received on Friday, 21 January 2011 09:42:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:43 GMT