Morten, Putting a collection of games attached to each person suggests a many-to-many relationship.
Why don't you have each game have an owner? Game (Id, Owner, Name) Owner (Id, Name) Then you have a one-many relationship. Cheers, Scott -- Scott Farquhar :: [EMAIL PROTECTED] Atlassian :: http://www.atlassian.com Supporting YOUR J2EE World Morten Wilken wrote: > i have a design question for the list: > > i have a situation where i have some persons that each owns a number of > games... each game has only one owner. > > using orions OR mapping features i have put a collection of games in each > personbean. This creates a many-to-many table with a personid and a gameid. > My database design knowledge tells me this is wrong, and that what i need is > a foreign key to the person table in the game table. > also, i would like to be able to both see what games a person owns, and who > owns a certain game. i cant seem to do that without creating redundant data > in the database... i would like to think i could make a sensible ejblayer on > a sensible database design. > > So in conclusion: how do i make this one-to-many relationship so i can read > it both ways without creating redundant data, and without making a > many-to-many table between the person and the game table? > > hope any of this makes any sense > > sincerely > Morten Wilken > > > >