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

  • Home
  • SEARCH
  • 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 8277749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:46:44+00:00 2026-06-08T08:46:44+00:00

I have a MySQL database with a growing number of users and each user

  • 0

I have a MySQL database with a growing number of users and each user has a list of items they want and of items they have – and each user has a specific ID

The current database was created some time ago and it currently has each users with a specific row in a WANT or HAVE table with 50 columns per row with the user id as the primary key and each item WANT or HAVE has a specific id number.

this currently limits the addition of 50 items per user and greatly complicates searches and other functions with the databases

When redoing the database – would it be viable to instead simply create a 2 column WANT and HAVE table with each row having the user ID and the Item ID. That way there is no ‘theoretical’ limit to items per user.

Each time a member loads the profile page – a list of their want and have items will then be compiled using a simple SELECT WHERE ID = ##### statement from the have or want table

Furthermore i would need to make comparisons of user to user item lists, most common items, user with most items, complete user searches for items that one user wants and the other user has… – blah blah

The amount of users will range from 5000 – 20000

and each user averages about 15 – 20 items

will this be a viable MySQL structure or do i have to rethink my strategy?

Thanks alot for your help!

  • 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-08T08:46:46+00:00Added an answer on June 8, 2026 at 8:46 am

    This will certainly be a viable structure in mysql. It can handle very large amounts of data. When you build it though, make sure that you put proper indexes on the user/item IDs so that the queries will return nice and quick.

    This is called a one to many relationship in database terms.

    Table1 holds:
     userName | ID
    
    Table2 holds:
    userID | ItemID
    

    You simply put as many rows into the second table as you want.

    In your case, I would probably structure the tables as this:

    users
    id | userName | otherFieldsAsNeeded
    
    items
    userID | itemID | needWantID
    

    This way, you can either have a simple lookup for needWantID – for example 1 for Need, 2 for Want. But later down the track, you can add 3 for wishlist for example.

    Edit: just make sure that you aren’t storing your item information in table items just store the user relationship to the item. Have all the item information in a table (itemDetails for example) which holds your descriptions, prices and whatever else you want.

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

Sidebar

Related Questions

I have MySQL database with two tables: users and items. They look like this:
I have mysql database and I want a software which can draw the database
I have this MySQl database that has a table which contains a column that
I have a MySQL database that has over 9000 rows with 10 fields. It
I have a MySQL database that is continually growing. Every once in a while
I have a MySQL database full of user information, like their username, password, email,
I have MySQL database of areas in a city. The attributes of each area
I have a database called RankHistory that is populated daily with each user's username
I have mySQL database that I see form my Ubuntu shell, I want to
I have a MySQL database with a structure like this... Site has many Sensors

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.