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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:15:38+00:00 2026-05-30T23:15:38+00:00

I want to make an app that allows users to add other users to

  • 0

I want to make an app that allows users to add other users to a personal friendslist. In my database there is a table called ‘users’. Every user has a unique id and a unique username, now every user needs to be able to have a list of friends.

I think the best option to save these friendslists is to create a seperate table with two colums, for every user. One column for the friends’ id’s and one for their usernames.

I can search and retrieve the friends username and id at the same time. On the downside I will need to create a hugh number of tables (hundreds, thousands, perhaps millions), one for each user.

Will this make selecting a table from the database slow?
Will this unnecessarily cost a hugh amount of space on the server?
Is there a better way to save a friendslist for every user?

  • 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-30T23:15:40+00:00Added an answer on May 30, 2026 at 11:15 pm

    You should not do that.

    Instead do something like

    UserTable
    * Id
    * UserName
    
    FriendsTable
    * UserId
    * FriendId
    

    You may need to read a little about relation databases.

    This way a user can be friend to a lot of people. Consider for this example

    UserTable
    1, Joey
    2, Rachel
    3, Chandler
    4, Ross
    5, Phoebe
    6, Monica
    
    FriendTable
    1, 2
    1, 3
    1, 4
    1, 5
    1, 6
    2, 3
    2, 4
    2, 5
    2, 6
    3, 4
    3, 5
    3, 6
    4, 5
    4, 6
    5, 6
    

    Here the people from Friends is all friends to eachother

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

Sidebar

Related Questions

I want to make an app that allows the user to add their own
I'm currently trying to make a form called countcash that allows users to input
I want to make an app that allows the user to quickly change input
We're trying to make an iOS app that allows users to create geographical points
i want to make a php app that let people submit photos/videos/sounds Now, everything
I want to make a little tk app that continuous ping an ip and
I want to make an Android Game App that loads a game slot that
I want to data mine dribbble.com so I can make an app that registers
I want to to make an application that gather some app that already in
i want to make an app which can add the file properties of a

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.