Results 1 to 8 of 8

Thread: Football Help

  1. #1
    Join Date
    Jul 2011
    Posts
    5

    Football Help

    hi guys could any one help me normalise this :TEAM(Team_id,TeamName)

    PLAYER(Player_id,FirstName,LastName,DOB)

    CONTRACT(Player_id,Team_id,StartDate,EndDate,Sqaud Number)

    FIXTURE(Fixture_id,Ref_id,HomeTeam,AwayTeam,Date)

    REFEREE(Ref_id,FirstName,LastName)

    DISCIPLINARY CASE(DCase_id,Player_id,Fixture_id,Event)



    im struggling to get my head round the hometeam and awayteam, Do i make new tables for them, or somthing else

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    It must be homework season again.
    Do not make separate tables for home teams and away teams.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by cpod500 View Post
    im struggling to get my head round the hometeam and awayteam
    you mean in the fixtures table? they are both foreign keys
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Jul 2011
    Posts
    5
    Foreign keys from which table ?

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by cpod500 View Post
    Foreign keys from which table ?
    take a screaming wild guess -- which of your tables has team information in it?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    Jul 2011
    Posts
    5
    So my team_id can be in hometeam colum and away team colum ?

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    um..... yes
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  8. #8
    Join Date
    Jul 2011
    Posts
    14
    These tables look, at least, in BCNF normal form.
    The only thing I don't like in this design is the DCase_id in DISCIPLINARY CASE.
    You can eliminate it but add DCase_time to show the time that the event happened if you want to be more realistic.

    Am I right?

Tags for this Thread

Posting Permissions

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