Reputation: 2723
I want to make a database that tracks the activity of members, so adds all the stuff they do. But to do that I think that I need a nested table, as the first would contain the user and his info and then a subtable to store all the events.
Can this be done in mysql?
So like:
username
email
telephone
events-> event 1, event 2, event 3
with each event having date, participants and time
Upvotes: 0
Views: 56
Reputation: 166336
You could look at a many to many approach.
So
Table Users
- UserID
- UserName
- User Etc.
Then
Table Activities
- ActivityID
- ActivityName
- ActivityGroupdID
- Acticity Etc.
Then
Table UserActivities
- UserID
- ActivityID
- Link Etc.
Further to this, you could think about user security, or roles where a user belonging to a specific group, might have access to specific activities.
Upvotes: 2