I'm creating a table of ownerships for files. A file can be owned by either a single user (table Users) or a group of users (table UserGroups). I would like to make this whole relationship as one table, where each tuple is either a group's ownership or a user's ownership of a file.
Users: User_ID(PK), name, email
UserGroups: UserGrp_ID(PK), name, creator_ID(FK to Users)
TestGroupOwnerships: ???
I think it's possible to do both relationships as one table, but I'm not exactly sure how. It is also acceptable if Users or UserGroups tables need to change (still in the planning stage).
Thanks,
Alex