I'm very new to databases and I'm a novice to data abstraction, coming from Java. To teach myself, I'm working on an online app that will, among other things, allow users to be part of multiple groups.
Sketching out the database, it seems I'll have to have something like a "Membership" table:
UserID|GroupID
------|-------
1 | 1
1 | 2
2 | 1
2 | 3
2 | 5
I feel a little wary of this, since it's only two foreign keys, and only serves to link two objects. Is this standard practice for this kind of relationship? If not, what is the preferred method?
Again, I'm very new to databases. My book doesn't mention this kind of situation, so if there's some keyword that reflects this function that I overlooked...
Thank you.