I'm about to start a project that will hopefully eventually hit milion+ users. It is some kind of a site managment. Problem is how to set the db in MySQL? Some people suggest way 1 and others way 2. I hope you can help me decide the right path to start.
needs to be stored:
- all users info:
user | pass | account status user files:
path to compiled htm(in user folder with uid) | http request path | file seg1 | file seg2 | file seg3user settings:
personal settings (email..) | site settings (colors..) |
my ideas to store the data are:
path 1: have main db with table for usernames and passwords.
create each user with db which inside has a table for user files and a table for user settings.path 2: have main db for system which inside has:
table for users and passwords and 2 more tables for each user: user_files, user_settings.
edit, add another path:
- path 3: 3 DB.. one for users\passwords second for user_files and third for user_settings. This way it would separate the rows' weight evenly between the user_files and user_settings. Is that true?
And would a flat file system without the DB (beside the user password) be a better option here?
thank you.