I am very new to databases and I am new to data abstraction coming from Java. To teach myself, I am working on an online application that, among other things, will allow users to be part of several groups.
Having sketched the database, it looks like I will need something like a Membership table:
UserID|GroupID
------|-------
1 | 1
1 | 2
2 | 1
2 | 3
2 | 5
I am a little wary of this, since it contains only two foreign keys and serves only to connect two objects. Is this standard practice such a relationship? If not, what is the preferred method?
Again, I am very new to databases. My book does not mention such a situation, therefore, if there is any keyword that reflects this function, which I forgot ...
Thank.