In our game, each user can have multiple characters. Each character has a unique id we store in character data (cardID).
key: 'CardID', value: 12345
We need to be able to retrieve a character from just that cardID. Is that possible?
So for example, we are getting an update that cardID 12345 should get 10 points. We do not have the associated user.
Answer by Brendan · Aug 28, 2017 at 09:01 PM
In general, database lookups use indices in order to make finding a given record efficient. A data system where you could look up a record based upon any arbitrary value within that record would be much more expensive to run, as it would require full table scans for each lookup. So no, it's not possible to look up a character by the value of a key/value pair within the character.
But can you explain your design in more detail? If the user is the owner of the characters, why would you not know who the user is?