Sorry if this has been asked before, I couldn't think of how to formulate the question.
I have a database (specifically in amazon SimpleDB) in where I use 2 domains.
Domain 1 has a list of users with some general information.
Domain 2 is a list of items with the Item information.
I want to be able to query for all the items that belong to an specific user from domain 1. For this, each item can only belong to 1 user, so one of the attributes from domain 2 is, userID.
Until know I thought that the best option was to keep an attribute in domain 1 with the list of the items that this user has (something like item1&&item2&&item3&&...etc) and just query for this attribute. Which i think would make it very efficient, however i realized that the attribute limit is 1024 bytes so I will eventually run out of space (because my item names are a bit long).
In this case i thought I would have to do a "select * where userID = something" in Domain2 every time I want to get all the user items, but somehow this doesn't seem so efficient. (I could still keep a last updated and number of items in domain 1 to see if my local device needs to query or if it has the newest version locally).
Any advice would be great!
(Or should i ask this in stackoverflow for databases?)