The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Databases
> MySQL Help
|
Page 3 -
Football League Table [design / layout / relations]
Page 3 - Discuss Football League Table [design / layout / relations] in the MySQL Help forum on Dev Shed. Football League Table [design / layout / relations] MySQL Help forum discussing administration, SQL syntax, and other MySQL-related topics. MySQL is an open-source relational database management system (RDBMS).
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 1st, 2011, 12:18 PM
|
|
Contributing User
|
|
Join Date: Feb 2011
Posts: 30
Time spent in forums: 8 h 34 m 53 sec
Reputation Power: 3
|
|
Quote: | Originally Posted by cafelatte You're right, it IS an old thread!
Until the whistle blows, isn't the 'final score' simply the 'latest score' !?!? |
Correct just found that out after playing around with the script, great bit of code as it does everthing i been trying to do for a month
kenny
|

October 15th, 2012, 04:04 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 10
Time spent in forums: 5 h 2 m 42 sec
Reputation Power: 0
|
|
|
How would you go about comparing the previous position with the latest position for each club in the table?
|

October 15th, 2012, 04:54 AM
|
|
|
|
That is (potentially) too big a question to be so quietly tacked on to the end of such an ancient thread.
|

October 15th, 2012, 05:14 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 10
Time spent in forums: 5 h 2 m 42 sec
Reputation Power: 0
|
|
|
Does it really matter if the thread is ancient? I'm just merely asking how it can be achieved. I'm sure
Guelphdad would have some idea, as I thought his SQL query was great.
|

October 15th, 2012, 05:32 AM
|
 |
SQL Consultant
|
|
Join Date: Feb 2003
Location: Toronto Canada
|
|
Quote: | Originally Posted by willr Does it really matter if the thread is ancient? | yup, it does
i, for one, just don't feel like reading two entire pages of a dead thread to get up to speed on some database design that you likely aren't even using
what you should do is present a test case, in a new thread, that gives your table layout, sample rows, and the results you want from the query that you want help with
that's s.o.p. for asking a forum question
|

October 15th, 2012, 05:51 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 10
Time spent in forums: 5 h 2 m 42 sec
Reputation Power: 0
|
|
|
I'm actually using what Guelphdad posted on page 2 of this thread, as I'm just trying to add things to it. So, I should create a new thread with what Guelphdad's already posted?
|

October 16th, 2012, 10:02 AM
|
|
Contributing User
|
|
Join Date: Jan 2009
Posts: 41
  
Time spent in forums: 7 h 8 m 57 sec
Reputation Power: 9
|
|
|
Database Design Input
I looked at the database design and I must admit that I find it incorrect in terms of how it does home and away teams.
I don't know european football but I have built a database for basketball that mimics this basic idea, and the table with the teams in the games doesn't work (ideally) in my opinion.
In theory it seems like you want to have all the home/away team in the same database table, but when yo uwant to do queries to find a teams record/performance based on whether or not they are home or away - it becomes complicated to write the queries.
I've found that when you create these tables you have a 'parent' games table that is pretty basic with specific information, game date, location if it matters, attendance, stuff specific to the GAME itself.
Then you have a 'teams in the game' table. which has a foreign key that references the games table, a field for the team name, a field for whether the team was home or away and a field for whether the team won or lost, this allows easier queries. (If you don't want to track scoring by halfs/overtime yo ucan also put the final score in this field)
I don't really understand the standings question you are asking, if you want a running standings, I've built a query for that too (using american baseball day by day records) and it's a query that aliases the same table three times.
I don't know european football but I do know 'league creation' databases, please let me know if you want some help with the normalization as the version on page 2 isn't properliy normalized in my opinion
|

October 20th, 2012, 12:57 PM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 10
Time spent in forums: 5 h 2 m 42 sec
Reputation Power: 0
|
|
|
yes, please if can help with the normalization that would be great. If you visit this url "bbc.co.uk/sport/football/premier-league/table", I think you'll understand what i meant. Thanks
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|