TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-25-2009, 12:53 PM   #1 (permalink)
The Acquainted
 
Hightower's Avatar
 
Join Date: May 2009
Location: Durham, UK
Posts: 134
Thanks: 9
Hightower is on a distinguished road
Default Database Design

Hey folks, I need some help! I'm working on a project and I need to design the database. The thing is I could use some help as the database could possibly be quite complex, and I've never done anything of this size before.

The project is for a football team, and will work similar to that of web-teams (example here: http://www.webteams.co.uk/Home.aspx?...laswanderersfc). The site will have all the same features to start, such as fixtures/results, league table, stats etc etc. I want the site to also accept user registration as I will through time be integrating a message board and other features.

Could anybody help me? I'm not sure what information you'll need in order to help me so please tell me what you need to know .

Thanks,
__________________
Hightower's Softpolio
Send a message via MSN to Hightower
Hightower is offline  
Reply With Quote
Old 06-25-2009, 03:37 PM   #2 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

To start you off, all the football teams should be centralised in one table. So Everton, naturally being first, Chelsea, Arsenal, all listed in one table. And then when you add other tables, you will simply set the appropriate team_id corresponding to the team table.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 06-25-2009, 04:54 PM   #3 (permalink)
The Acquainted
 
Hightower's Avatar
 
Join Date: May 2009
Location: Durham, UK
Posts: 134
Thanks: 9
Hightower is on a distinguished road
Default

Yeah, that sounds good. How would I handle each result? Because each match day could have 10 different results from the league, or it might have 8 or whatever, and there might be 20 match days a season.

There might also be another 10 cup games which would not count towards the league table etc.

How would I calculate the league table using results in the db?
__________________
Hightower's Softpolio
Send a message via MSN to Hightower
Hightower is offline  
Reply With Quote
Old 06-29-2009, 07:28 PM   #4 (permalink)
The Contributor
 
Join Date: Apr 2005
Location: Kent, UK
Posts: 54
Thanks: 0
Dr John is on a distinguished road
Default

Well, you could use a fixture table as the next main thing to work on...

fixture {date, location, home, away, score_home, score_away}
if that is a bit too cumbersome with the natural triple composite key, add fix_id as well.
__________________
www.kidneydialysis.org.uk
Dr John is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use the Singleton design pattern Karl Advanced PHP Programming 27 10-22-2012 08:16 AM
[Tutorial] How to organize your classes | Part 1 Tanax Advanced PHP Programming 10 03-01-2009 10:08 PM
Need some advice in DB design DeMo MySQL & Databases 6 01-30-2008 12:32 AM
Adding Images to a database from a folder Rendair Advanced PHP Programming 3 01-13-2008 07:40 PM
Review my database design Haris MySQL & Databases 12 12-30-2007 04:22 AM


All times are GMT. The time now is 02:31 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design