Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:02:55+00:00 2026-06-12T18:02:55+00:00

My question is specific to dojo store, but I think the issue would be

  • 0

My question is specific to dojo store, but I think the issue would be similar with html5 indexedDB.

I deal with data sets stored in a matrix, for example sports league results. Each item looks like this:

host:"Team3", visitor:"Team8", result:"3-1", season:"2012"

My issue is that dojo store (or indexedDB) require a key. In my case I don’t have one, as none of the properties is specific to the item.

What would be the best way to deal with this? I have considered two options but I don’t like them:

  1. Add an id property to each item (for example incremental number)
  2. Create a hierarchy in my data, for example:

    {host:”Team1″, results:[
    {visitor:”Team2″,result:”1-1″,season:”2012″},
    {visitor:”Team3″,result:”1-2″,season:”2012″},
    …]

In both cases, the structure is heavier for no benefit (other than matching the specifications). Is there a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:02:56+00:00Added an answer on June 12, 2026 at 6:02 pm

    I can only speak for indexeddb, but if you don’t need to care about a key and you need one. In this case I would choose for an autoIncrement key without a key path. In this case you will have a key, and this key won’t be added inside your object. If you need the key, than set the key path to Id. This way the Id property will be added to your object with the autoIncrement key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very specific question but we have some good Ada people here so I would
We're using gwt-presenter, but not really a question specific to that... I've got a
My specific question is about using URLByAppendingPathComponent but the principle will be applicable to
I have a specific question regarding the Trie data structure and what is going
This question is specific to MonoDevelop I think. I've got a test monorail solution
Quite a specific question, but I was wondering if anyone has had any problems
This question is specific to capistrano, but it's a general gem question too. I
Ok this is a really specific question, but I can't seem to find the
My specific question is about ASP.NET MVC but I am sure that the answers
This question might be a bit long and specific, but I have been attempting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.