Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009

    Database Structure for a Fantasy Football Website

    I am currently developing a Fantasy Football website using and an SQL Server 2008 database.

    Below are my tables thus far;

    General Data

    CLUB - Club_Id, Club, Abbr, Kit_Id
    PLAYER - Player_Id, Player, Club_Id, Position_Id, Side_Id
    POSITION - Position_Id, Position
    SIDE - Side_Id, Side
    KIT - Kit_Id, MIMEType, Kit

    Season & Round Data

    SEASON - Season_Id, Season(e.g. "2009/2010"), StartDate, EndDate
    ROUND - Round_Id, Round(e.g. "round 1")

    Fixture Data

    FIXTURE - Fixture_Id, Season_Id, Round_Id
    FIXTURE_DATE - FixtureDate_Id, Fixture_Id, Date

    What I want to achieve is a way in which I can create matches using the following;

    A club that plays at HOME
    A club that plays AWAY
    A FIXTURE_DATE for the specific match

    Then subsequently, I want to achieve the following from ;

    Line-Ups for the HOME club and for the AWAY club

    How can I achieve this? Help would be much appreciated

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    i would do away with the following tables:

    POSITION - Position_Id, Position
    SIDE - Side_Id, Side
    ROUND - Round_Id, Round(e.g. "round 1")
    FIXTURE_DATE - FixtureDate_Id, Fixture_Id, Date

    the first three of these, simply use the "data" column where you had been intending to use the "id" column as a foreign key

    for FIXTURE_DATE, just use the actual date in whatever other table needs it

    what's the difference, to you, between a fixture and a match? | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Feb 2004
    One Flump in One Place
    I would also think about which of these things are time dependent, and whether or not you want to record these things as such. For example, if a player plays for Poots in one season and moved to Flumps the next then your database as it stands will effectively show him in all Flumps' matches for that first season.
    pootle flump
    ur codings are working excelent.

Posting Permissions

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