Solved

Multiple Accounts

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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
The viewer will learn how to count occurrences of each item in an array.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

623 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