Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2007
    Posts
    8

    beginner - needs feedback on simple database design

    This is a database I made for a project, any feedback is appreciated. Is setting up the handPlayed and Bet tables like this bad design? I rarely see designs set up like this. Is there a better way to do it without sacrificing too much performance (which is important for this application). thanks.

    db_relationships.GIF

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    I would probably make the Bet table a child of the HandPlayed table.
    It's PK would be HandNum, PlayerNum, and BetNum. (BetNum would begin with 1, and increment for each Player/Bet number.) HandNum and PlayerNum would be fk's to HandPlayed.

    PlayerNum 1, HandNum 1, BetNum 1, type, amount...
    PlayerNum 2, HandNum 1, BetNum 1, type, amount...
    ...
    PlayerNum 1, HandNum 1, BetNum 2, type, amount...
    PlayerNum 2, HandNum 1, BetNum 2, type=fold, 0, ...

    I think that this probably models the game better than two, discrete intersection tables.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    Mar 2007
    Posts
    8
    thanks for the help.

    will this change effect the performance? for better or worse? probably not?

    does my original design break any basic normalization rules? Its in 3rd normal form - right?

    sorry, I'm getting burnt out on this, can't think straight anymore

  4. #4
    Join Date
    Mar 2007
    Posts
    8
    i noticed holecardrank is dependent on holdcards, so this is not in 3nf. this is not really important, I'll probably remove the holecards attribute, i don't use it anymore.

    I can't decide if i want to change to the alternative design or not. What would be the difference if I want to do a query like, select all bets for a player?

Posting Permissions

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