If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Database Structure for a Fantasy Football Website

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-09, 09:11
LilDaveM LilDaveM is offline
Registered User
 
Join Date: Jul 2009
Posts: 8
Database Structure for a Fantasy Football Website

I am currently developing a Fantasy Football website using asp.net 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
Reply With Quote
  #2 (permalink)  
Old 07-24-09, 09:37
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 07-24-09, 09:42
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
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.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On