Link to home
Start Free TrialLog in
Avatar of Member_2_8034623
Member_2_8034623

asked on

Table formats and best practices

Hi,

I am curious about best practices

Scenario:
Want to be able to track group task and personal tasks

Details
  1. Group tasks are independent of personal tasks
  2. Group tasks can be assigned to a person
  3. Task assignments are only at the group level
  4. Personal tasks are automatically assigned to that user
  5. Personal tasks only apply to that person
  6. The columns within the tasks table would be identical for both personal and group with exception of the ID (group/user)

Im curious if it is better practice to great three tables like so

tables
  1. entity type (ex: 1 =  group, 2 = user)
  2. tasks -> add an additional field to compensate for entity type
  3. tasks-assignments

Or to separate the tasks table into two tables one for users and one for groups (assignments would only be associated to the second table)

Thanks in advance!!
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can a task be linked to more than one group?
Avatar of Member_2_8034623
Member_2_8034623

ASKER

Hi,

Group tasks are unique to each group

Later i want to expand the capabilities of the tasks. Where a group can be divided into subgroups and then the task could then be assigned to subgroups and players within the larger group. Currently, this is not supported.

Depending on your data models and needs, you may not even need the Entity Type table. If this is going to just be a single column table, then it may be redundant altogether - just store it in the Task table.

Could you please elaborate? im not sure what you mean.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial