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 > ERD of football database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-08, 16:02
starkytwo starkytwo is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
ERD of football database

Hi there

Im currently doing a project trying to research a soccer database and at the moment I am working on drawing up an ERD.

I have only a little experience in database design and was wondering if anyone would be willing to look over the ERD and suggest improvements.

I am having particular trouble in trying to represent the fact that a player could belong to two teams (one proper and one on loan), and also how the fixtures and results would be represented in terms of tables.

I have attached the ERD for anyone who wishes to view it.

If any more details are needed feel free to ask.

thanks in advance
Attached Thumbnails
ERD of football database-footballdatabase.jpg  
Reply With Quote
  #2 (permalink)  
Old 03-05-08, 16:46
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by starkytwo
I am having particular trouble in trying to represent the fact that a player could belong to two teams (one proper and one on loan),
there are two approaches

1. add a "role" attribute to the Team_Player table

pro: only one relationship table
con: must allow multiple rows per player, tricky to limit this to 2

2. leave Team_Player as proper, add separate Team_Player_Onloan relationship table

pro: PKs can be enforced
con: queries get trickier
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-05-08, 16:57
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
Wait a minute. Did you say Football, or did you say Soccer? Make up your mind.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #4 (permalink)  
Old 03-05-08, 20:13
starkytwo starkytwo is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
hi

thanks for your replys. I am talking about soccer, sorry I put football in the thread title but then realised that may mean american football to some of you!
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