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 8905691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:27:35+00:00 2026-06-15T02:27:35+00:00

Sorry if this has been asked before, I couldn’t think of how to formulate

  • 0

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?)

  • 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-15T02:27:36+00:00Added an answer on June 15, 2026 at 2:27 am

    I don’t know about amazon-simpledb, but in database terms, you have two tables: the first is a table of USERS which presumably stores at least a user id and username; the second is a table of ITEMS which stores an item id, an item name and its current owner/user.

    You do NOT want to store a list of items that the user owns in a delimited list in the users table; traversing this list will be painful. Apart from that, the data (which users owns which items) already exists in the items table.

    In standard SQL, you would write the following query to retrieve a list of the items that a specific user owns

    select items.name
    from items inner join users
    on items.user = users.id
    where users.username = 'Luis'
    

    Standard databases are built to handle tables with millions of entries so don’t worry about efficiency (at least, as long as you add the appropriate indexes – you would need an index on the ‘user’ field in the items table).

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

Sidebar

Related Questions

Sorry if this has been asked before, but I couldn't find a good example
I'm sorry if this question has been asked already, but I couldn't find it
Sorry if this has been asked before, I did check but couldn't find anything...
Sorry if this has been asked before or it's a really dumb question, but
Sorry if this question has been asked before. On my search through SO I
sorry if this question has been asked before, I searched but wasn't sure on
So, if this question has been asked before, I'm sorry. I'm not exactly sure
I'm sorry if this question has been asked before, I've tried googling/looking on here/browsing
Sorry if this has been asked before, but I couldn't find a solution to
I'm sorry if this question has been asked before, but I can't seem to

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.