Re: [IndexedDB] Compound and multiple keys

Disclaimer: all of my db experience is with SQL.

I prefer option A.  It's simple and easy.  Option B requires you to
potentially duplicate information into an array to use as a key, which
I don't like.

That said, I don't have much experience with out-of-line keys.  Can we
combine A & B such that in-line keys are A and out-of-line keys are B?
 That seems to be intuitive.

To answer your specific questions, I've never used a compound key with
variably numbers of columns.  (Disclaimer: I'm strongly in the
synthetic-key camp, so I don't really use compound keys anyway.  But
I've never seen an instance where I would have wanted to use a
variable number of columns, were I to index the table with a compound
key.)

I can't distinguish your second question from the first.

For your third question, the closest analogue in SQL to an array is a
SET.  I can't tell whether or not SETs can be used as keys.

~TJ

Received on Thursday, 2 December 2010 01:20:45 UTC