Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kage777

macrumors newbie
Original poster
Feb 24, 2008
20
0
Hi, I am new to Core Data, and have been trying to figure out how to set up my data model. I made a sample table to try and show how I need the data to relate.

I attached a table that has the basic structure of how things need to relate to each other, but I am not positive how to set it up for core data.

From what I have read I think I need entities for Players, Competitions, GameNames. With To-Many relationships between players and competitions and gameNames, also a relationship between gameNames and competitions.

And then attributes of First Name, Last Name, competitor number, gender, team for players. Attributes for competition would be month (or name), Attributes for GameName would be name.

And then I get stuck I don't know if the all time high should be an attribute of GameName because it needs to be associated with the individual player, and players will have different high scores for different games. I need to be able to keep track of number of tries and the highest level for games like donkey kong, so would I make attributes of game1, game2, game3? But other games like pac-man I only care about the end score. So would game1, game2, game3 be attributes of the player or the game? or should it be an entire entity by itself?

thanks for any help.
 

Attachments

  • datamodel structure.pdf
    24.9 KB · Views: 176
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.