General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 8th, 2004, 05:05 PM
laugharne laugharne is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: wales
Posts: 3 laugharne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Relational DB Structure

I have a successful site running using a flat database. Due to hits and infoI know require, I am trying to
change to a relational database.The site is an athletics results site in the uk. I want to be able to show results
by athlete, club, country, meeting and event. I also want to mark performances as to which Grade (1-4) they equal, and
show if they break a record and ranking in the UK all time list. A lot, hence the move from a flat table to relational database.
The structure I have designed is flawed- I think normalisation is wrong or I may have errored on relationships. ( I am testing in access,
though will be using mysql on the site.

Table1 : Athlete
~athid
~athfnam
~athsurnam
~club id
~country id
~sex

Table 2 : Club
~Club ID
~club name
~club county
~club country
~club web
~club email
~ath id

Table 3 : Country
~country id
~country name
~club id
~athlete id

Table 4 : results
~results id
~athlete id
~event id
~performance
~date
~meeting

Table 5 : events
~ event id
~ event name
~ event age group
~ event type (indoor or outdoor ? should I have a seperate table ?)

Table 6 : Records
~records id
~ event id
~country id
~performance

Table 7: Grade
~grade id
~ grade name ( i.e grade 1, 2 , 3 ,4)
~event id
~performance ( between or under to figures i.e grade 2 might be from 8.0 to 8.5)

Table 8: Meeting
~meeting id
~meeting name
~meeting date
~location
~county id

Table 9: UK ALL TIME LISTS
~ alltime id
~ ath id
~ event id
~ performance.

I cannot get this to work, I am new to the relational database concept, so may have made errors in table design.

Any siggestions would be welcome.

Thanks

charles

Reply With Quote
  #2  
Old March 8th, 2004, 11:25 PM
Buster77 Buster77 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 28 Buster77 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Just as a quick look, Country should not have club_id or ath_id and Grade should not have event_id.

Reply With Quote
  #3  
Old March 8th, 2004, 11:46 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Curious... Why does club have two country fields?

~club county
~club country

Reply With Quote
  #4  
Old March 9th, 2004, 02:31 AM
laugharne laugharne is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: wales
Posts: 3 laugharne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
county and country

One is County, say Hampshire ( as in state, say BC) other Country as in Canada



Quote:
Originally Posted by MadCowDzz
Curious... Why does club have two country fields?

~club county
~club country

Reply With Quote
  #5  
Old March 9th, 2004, 02:37 AM
laugharne laugharne is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: wales
Posts: 3 laugharne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Grade

Grade realtes to event- i.e take U15G 60m- time under 8.0 = Grade 1, btween 8.5 = Grade 2- I added the evnt ID because each event has a
different standard- U13 G 60m Grade 1 might be under 8.4. So I though I would have to relate each event with a grade. Maybe the grade table is not
well explained- I will have about 200 different standards acrooss ages and events.


Quote:
Originally Posted by Buster77
Just as a quick look, Country should not have club_id or ath_id and Grade should not have event_id.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > Relational DB Structure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT