Solved

Multiple Accounts

Posted on 2009-07-10
3
218 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 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 108

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now