Solved

Multiple Accounts

Posted on 2009-07-10
3
222 Views
Last Modified: 2013-12-13
hello,

I'm a php developer, and I wish to create a board service where people can register for a board to start their own communities.

I was wondering the best way to handle the database structure.

A board can have multiple tables (posts, members, settings, boards, skins, etc), I wouldn't want to create a database for each user that signs up would I?

Am just after some advice which would allow the service to scale easily if it was to be very popular.

I will be using PHP and MySQL (does database / table type matter?)

Thanks alot
0
Comment
Question by:JoePCali
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
aamodt earned 63 total points
ID: 24822631
no, not create one DB for each user..

you can have a table that are called user which contains the basic user information and such..

and you can make a table name "board" with different settings linked to the user like:

id
u_id
theme

and so on

Regards Aamodt
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 62 total points
ID: 24826090
For the "one board per user" strategy, I would do it this way...

When a client registers, generate a short, unique prefix for the data base tables.

Use an abstraction layer for your DB access that is aware of the prefix.

Let your queries all say something like this:
SELECT * FROM {$dbt_prefix}_members WHERE...

If your site becomes so popular that you can't live with the performance of that data organization, you will be able to raise venture capital and hire developers to help you build out a high-performance hosting farm.

Good luck with it, ~Ray
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
The viewer will learn how to count occurrences of each item in an array.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question