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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:13:28+00:00 2026-05-31T21:13:28+00:00

I’m trying to understand how to design a database that can accommodate an indeterminate

  • 0

I’m trying to understand how to design a database that can accommodate an indeterminate number of fields per User.

For example, User1 is involved in Projects A, B and C. User2 is involved in Projects A, C, E and G while User3 is involved in Projects A, B, C, D, E, F and G.

A table with Users listed in rows and then 7 more columns to record the Projects they’re involved in would serve quite nicely… until I have to accommodate User4 who winds up being involved in 100 projects, which, in my model, would require 100 columns for keeping track.

There would ultimately be no way of knowing in advance how many columns to define.

I could flip it around and associate User1 & User3 with Project B, but then further on down the road, after there are 10,000 Projects, I’d have to look through each Project record to produce a complete list of Projects that a given User has been involved in, which seems terribly inefficient.

So… how to keep track? Just can’t quite wrap my head around this one.

Am total newbie, so forgive me if this is poorly stated or grossly elementary.

Thanks,

Ben

  • 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-05-31T21:13:29+00:00Added an answer on May 31, 2026 at 9:13 pm

    It sounds like you may be trying to mix these two entities (user and project) into a single table, which really isn’t the best way to go.

    A different approach is to have your user info in a user table, project info in a project table, and another “link” table like user_projects, which would just contain the ID fields from the user and project tables, one entry for each user in each project.

    an example schema:

    user (userID, firstName, lastName)
    
    project (projectID, projectTitle)
    
    user_projects (userID, projectID)
    

    To select project titles for user 3, you could do something like:

    SELECT p.projectTitle 
    FROM project p INNER JOIN user_projects up ON p.projectID = up.projectID
    WHERE up.userID = 3
    

    The point of the user_projects table is to link the information contained in the user and project tables, that is all.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am trying to render a haml file in a javascript response like so:

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.