Advice for table organization

I want some opinion for this.

I have a table "pages" that will have users,fans and administrators.A page will have some users,fans and administrators.It is best to keep all users,fans and administrators in one table or to separate administrators at another table.Thinking that the user page may have a lot of data some day.

The way I will do it for now is to create 1 table for users,fans and administrators (us_type=0 for fans etc)

Thank you

You’re doing fine - just one table for all user types and have a column indicating their status. Then add a function in the model that retrieves the user type so you can limit their actions.

Yep you’d have one table with all of your users, fans and admin. Then have a field to signify their status. Then have another table for your “pages” and in there you’d have a foreign key to your users table (e.g. user_id). Mysql tables can handle lots of records with no problem so i wouldn’t worry too much. On a standard server you can get into the hundred of thousands before you hit any issues.

I would create another table for administrators for security reasons.

I wouldn’t say its needed and will cause more hassle than good he’ll then be trying to keep two authentication systems going. As long as you use a good security setup like md5 hashes and salts, and escape all your input you should be fine.