| | |
Another beginner needs advice..
Please support our Database Design advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2007
Posts: 2
Reputation:
Solved Threads: 0
Hello,
I'm new to the forum so please give a hand
I've been working with php/MySQL for about 6 months, just trying out new stuff and so, but now I feel ready to build a REAL site!
I'd like to make one of those community sites where everyone has their profile, personal messages, gallery (with tags and gallery folders), a blog and a list of people that viewed the users profile / list of profiles that the user viewed.
What's bugging me is the DB design. Should I:
A) Make a few GLOBAL tables (e.g. gallery, image_list, user_list, viewed_profiles, blog, tags..) in which I would store the info of EVERY user (indentified by their ID), or
B) Make all of the tables mentioned above (e.g. gallery, image_list, user_list, viewed_profiles, blog, tags and so on) for every user INDIVIDUALY (e.g. user John would have tables: john_gallery, john_blog, john_tags).
I'm asking this because I'm worried about speed. What if the site has 10 000 or more users?
In case A that would mean having millions of messages in a single table and being very slow.
In case B I will probbably end up with hundreds of thousands of tables in my DB.
Or is there a solution C?
Help
I'm new to the forum so please give a hand

I've been working with php/MySQL for about 6 months, just trying out new stuff and so, but now I feel ready to build a REAL site!
I'd like to make one of those community sites where everyone has their profile, personal messages, gallery (with tags and gallery folders), a blog and a list of people that viewed the users profile / list of profiles that the user viewed.
What's bugging me is the DB design. Should I:
A) Make a few GLOBAL tables (e.g. gallery, image_list, user_list, viewed_profiles, blog, tags..) in which I would store the info of EVERY user (indentified by their ID), or
B) Make all of the tables mentioned above (e.g. gallery, image_list, user_list, viewed_profiles, blog, tags and so on) for every user INDIVIDUALY (e.g. user John would have tables: john_gallery, john_blog, john_tags).
I'm asking this because I'm worried about speed. What if the site has 10 000 or more users?
In case A that would mean having millions of messages in a single table and being very slow.
In case B I will probbably end up with hundreds of thousands of tables in my DB.
Or is there a solution C?

Help
•
•
Join Date: May 2007
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
Hello,
I'm new to the forum so please give a hand
I've been working with php/MySQL for about 6 months, just trying out new stuff and so, but now I feel ready to build a REAL site!
I'd like to make one of those community sites where everyone has their profile, personal messages, gallery (with tags and gallery folders), a blog and a list of people that viewed the users profile / list of profiles that the user viewed.
What's bugging me is the DB design. Should I:
A) Make a few GLOBAL tables (e.g. gallery, image_list, user_list, viewed_profiles, blog, tags..) in which I would store the info of EVERY user (indentified by their ID), or
B) Make all of the tables mentioned above (e.g. gallery, image_list, user_list, viewed_profiles, blog, tags and so on) for every user INDIVIDUALY (e.g. user John would have tables: john_gallery, john_blog, john_tags).
I'm asking this because I'm worried about speed. What if the site has 10 000 or more users?
In case A that would mean having millions of messages in a single table and being very slow.
In case B I will probbably end up with hundreds of thousands of tables in my DB.
Or is there a solution C?
Help
Dont forget to normalise the tables though.
Hope this helps!
Dear ivanfx, dont get me wrong, but any given book you pick up, related to databases on the first page it will state that there are 2 types of databases - relational and flat-file. Relational databases are famous for their ability to bring flexible and higly cohesive and loosely coupled solutions to dataflow. Now, think of it this way: in relational database you enter a record once, and you identify it. For example, you have a record for user John, and this record is associated with UserId = 1 (the field name and the value could be anything). From this point on, this user John will be represented as UserId 1 throughout your database. This saves space and time. Hope this helps.
******************
15 minutes of research can save you 50% or more. forum.feodorgeorgiev.com
***Need Web Hosting?
******************
15 minutes of research can save you 50% or more. forum.feodorgeorgiev.com
***Need Web Hosting?
******************
![]() |
Similar Threads
- C++ Performance Tips (C++)
- audio level detection (Visual Basic 4 / 5 / 6)
- Very Beginner (Community Introductions)
- Beginner problem compiling with javac (Java)
- Can Anyone Help a Complete Newbie? (HTML and CSS)
- Laptop buyer advice (Troubleshooting Dead Machines)
- IE not opening new windows advice (Web Browsers)
- c++ learning advice (C++)
- stuck with definition (C++)
- some advice plz [career advice for a programmer] (IT Professionals' Lounge)
Other Threads in the Database Design Forum
- Previous Thread: Help on General Best Practices for Table/Database Design
- Next Thread: database questions I have
| Thread Tools | Search this Thread |






