views:

35

answers:

1

i am designing a database where users can update status messages of theirs and they can create pages groups like facebook fan page and post status like the admin of the page and not as a user.

user(id, name..)

group(id, name...)

group_admin(group_id, user_id)

this is my set up. Is this the way to do it. How to post under the group as an admin. will i need to make a check to every user if he is the admin or not ?

+1  A: 

well you could say that when a user posts messages on a page group, on witch they're registered as admin, then the message is posted as page group admin, otherwise it's posted as user.

janbom
ok. how to store in the db that they are admins ?
Harsha M V
depends on how you define admins. you could say that if a user_id is registered in the group_admin table then the user is of type admin for that group_id.
janbom