Jump to content

Teams and group tables


xionhack

Recommended Posts

Hello. I have an organization where the members are grouped in teams, which have a team leader, and big groups, which have a group leader.

 

It goes like this, one member can only have one team, meaning one team leader. One team (team leader) takes care of 1 or more than 1 members. 1 team can have 1 or 2 team helpers.

 

Each team is part of 1 group. Each group have a group leader. The group leader is in charge of 1 or more than 1 group leaders.

 

The way i have the tables set up is as follows:

 

Member Table : member_id, name, group_id, team_id, helper_id

Team Table: team_id, team_leader, team_helper, team_helper2

Groups Table: group_id, group_leader

 

 

I dont know if thats the best way to do it, I actually  feel its not even close. Does anybody has any input? Thanks!

Link to comment
Share on other sites

As long as you have table joins it should be correct. The blueprint you have seems ok.  Maybe you can also use a "rank" column. Something like this..

 

Members: member_id, name, rank, group_id, team_id

 

Groups: group_id, group_name

 

Teams: team_id, team_name, group_id

 

 

And you can query by ranks. For example..

 

$rank = "team_leader";

...."SELECT member_id FROM Members WHERE rank = '$rank'"

 

I think there may be more flexibility if you store the rank in the Members table

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.