Database Design for a Social Networking Website?

I’m developing a social networking website as a hobby project to improve my programming skills.
This a normal social networking website not a hi-fi stuff.
What I’ve done until now is:

  1. You can register/login (I’m using Relational DB)
  2. You can find friends. (All the users except your email because email is unique in the database)

The problem is:

  1. Adding friends (A user can have many friends) and that’s a problem with database design.
    Because next time when you click find friends it will show users except your email and your current friends email (and that’s expensive).

  2. So what should be the database design to make it less expensive.

  3. What kind of SQL queries should I learn to reduce my I/O(Bandwidth) usage.

  4. I’m aware of JOINS and Foreign Keys but don’t have a clue for applying these in many-to-many relationships.

If you post the design you have at the moment people will be able to help you better.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.