What is the most effective way to store group activities and personal activities in a database?

Currently, i have one table for all activities (events)

The activities have two unique "ids" one for entityId and one for typeId

Types include
1- user
2- team (group table)
3- company (group table)

entityId is either the group_ip from the group table or the  user_id from the user table

Would it be better to create a table where user and group activities are kept separate?

The problem is i would use a UNION to pull all the results from the activities into one list
LVL 6
J NUnicorn wranglerAsked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
Without knowing more about your needs, the short answer is no, it would not be better to create separate tables. If your Events are all the same, and the only thing different is the type of entity associated, then they should be stored in this manner with your TypeID and UserID fields (or whatever you call those fields).

Does more than one "user" participate in the same "event"? If so, you'd need a Join table between Users/Groups and Events. If not, then a Join table is unnecessary.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.