Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / July 2005

Tip: Looking for answers? Try searching our database.

Table Design - BAseball keeping historical teams

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
robo@gobluemail.com - 20 Jul 2005 16:48 GMT
Hello All,

I have pretty much built my database to keep track of teams and what they
have won over the years. My dilema is keeping track of teams once they move
or rename themselves. I don't want to lose historical team names or past info
about them.

My current plan

http://www.buntonline.com/images/baseball.jpg

My current problems but not sure how to resolve them:

1) Franchise moves but I want to keep their entire history.

Montreal Expos become expansion team in 1967 and becomes the Washington
Nationals in 2005

2) Franchise does not move but renames themselves. I want to keep their
historical name for seasons past.

Anaheim Angels till 2004 and rename themselves to the Los Angeles Angles of
Anaheim

3) Franchise moves leagues and divisions but I want to know what league and
division they were in past seasons.

Milwaukee Brewers move from the AL East to the NL Central in 1997

Thanks for your time
Rob
Douglas J. Steele - 21 Jul 2005 00:21 GMT
One approach to handling changes over time is to change the one-to-many
relationship to a many-to-many relationship.

Rather than have LeagueAndDivisionsID as a foreign key in tblTeams,
introduce an intersection table between them, with LeagueAndDivisionsID,
TeamID and EffectiveDt as the primary key of that table. Include ExpiryDt in
the table as well. Have ExpiryDt be Null for the current row (to make
queries easier). I typically have ExpiryDt equal to the EffectiveDt of the
next row.

To handle name changes, you can have a parent-child relationship. Store
whatever's relevant to the "team" in the parent table, and store the names
in the child entries associated with that parent.

You can, of course, take this to extremes. tblLeaguesAndDivisions can change
over time, so you may want to put EffectiveDt and ExpiryDt there as well.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Hello All,
>
[quoted text clipped - 31 lines]
> Thanks for your time
> Rob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.