Since I can't store lists, should I add a column to my table called owned games
and then just keep a long string like "game1, game2…"?
Or should I add another table called something like ownership
and every row represents the fact that a user is linked to a game…
ownership
- gameID
- owner
- dateAdded
Best Answer
You first need to decide: can a game be owned by more than one person? (consider also if the answer might possibly be yes in the future).
If yes) Then you have a many-to-many relationship and as you described the only way to do this is to use an intermediary table with atleast these three columns:
The naming convention for an intermediary table is normally a combination of the two tables you are connecting. So in your case it would probably be 'Game_Owner'.
If no) You have a one-to-many relationship and no intermediary table is required. In the Game table include a column called 'Owner_ID' which is a foreign key.