Results 1 to 4 of 4

Thread: is my data normalized

  1. #1
    Join Date
    Mar 2004
    Posts
    2

    is my data normalized

    I am on a mission to at least start loading my database with information. Only problem is, I cannot seem to get past this normalization stuff. I only know what I've read from various websites. They all pretty much say the same thing. Since dbjournal, in my opinion, provides more insight than the others, maybe I can invoke some of the members to provide some wisdom to my problem.

    I need to create a db for basketball events, teams, players, and stats. Tricky part is that players can play for multiple teams, as long as it's not in the same event.

    So far, I have quite a few tables:

    Events table,

    Teams table,

    Events Teams table (link the many-many tables Events and Teams),

    Players table,

    Team Players table (link the many-many tables from Teams and Players),

    Player Stats table (link the one-many table from Players),

    Gamestats table (not sure what type of table this is)

    Essentially, Player Stats Table will include the fields player, team and stats. I am using an FK (team) from Players table, which uses an FK (team) from Teams table to update (team) if a player changes teams. But, if the player changes teams, all the stats will change the team field as well.

    How do I update Player Stats Table field (team) without touching old stats that might have an old team under field (team)?

    Whew, that took alot just to explain it. I hope someone understands, and even better, have a solution.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    How do I update Player Stats Table field (team) without touching old stats that might have an old team under field (team)?
    Why do you need to update the team?. Don't you want to keep the old stat of player with the old team?.

    For new stats with new team insert new rows.

  3. #3
    Join Date
    Mar 2004
    Posts
    2
    ...to cut down on update anomolies. If I just add a new row of data, I would be updating the same field (team) a minimum of 3 times everytime a player changes teams.

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    That means you don't want to save player's stat with old team.

    If you want to minimize updating team, then you should not have Team field in Player Stat table, just keep Player ID and stat.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •