Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Multiple Accounts

Posted on 2009-07-10
3
Medium Priority
?
227 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
3 Comments
 
LVL 7

Accepted Solution

by:
aamodt earned 252 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 248 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

In this article, we’ll look at how to deploy ProxySQL.
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

963 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