Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    2

    Unanswered: Temporary storing items

    Hi,
    I'm creating a website whereby users can purchase hundreds of items. However, the shopping basket is handled by a third party web service, and I would not like to keep hammering their API everytime a user adds an item. Therefore, I'd like to store items stored in their basket on my servers, for a temporary amount of time (up to a couple of weeks or so). What would be the best way to store this information? Would I have to create a new table for each user that has all their product information added per row? Or is there a more efficient way of doing this? There are potentially thousands of concurrent users, so a thousand tables sounds excessive and like a bad design.

    Thanks for any help or ideas!

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    you are right. that would be a bad design.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    lol thanks for the quick clarification . I'm currently designing the whole system, so I thought the best thing to do would be to get some ideas before actually programming anything. Another idea I just had would be to have one table that stores all items purchased and have a column that stores userIDs of anyone who's purchased that particluar item. That way, the maximum number of rows the table could potentially be would be the same as the number of items. Although, I'd rather not do this due to storage restrictions, I think it's a step in the right direction. If so, how would I go about storing multiple userIDs in one cell?
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •