**Football stat collector
**Use C# and sql Express 2008 do develop this.
Collect football stat from a site, and store this in a database. Make functions to list countries, leagues, seasons, teams and matches from database.
Make well documented code that I can work with later.
## Deliverables
**Football stat collector
**Use C# and sql Express 2008 do develop this.
Project:
I want this software to collect all historic football matches data and place it in a database. I want the database to have information about half time score and full time score. The software should also inform of the upcoming games.
Where to get the information (suggestion):
The tree menu can be downloaded from
<[login to view URL]>
In the tree menu you can search for leagues with football. In the tree menu, you can find football
Example:
[login to view URL](new TreeMenuItem(, "", "Football"));
sports[10].sportID = 1;
sports[10].[login to view URL](new TreeMenuItem(, "", "Albania"));
sports[10].children[].[login to view URL](new TreeMenuItem(3895, "seasonid", "Kategoria e Pare 11/12"));
The tree is grouped after sport categories; I am interested in the group Football. Each sport is grouped in countries and the competition.
I want your software to go thru all the leagues in this tree. The software can skip international matches and national/international cups.
Each league has a seasonid: To go to the season, go to the following address:
<[login to view URL]>
In each season page, there is a drop down combo with all the historical seasons of this leagues:
<div class="seasonSelectForm">
<form name="season" action="[login to view URL]" target="text">
<input type="hidden" name="language" value="en">
<span class="selection_text_between">Season:</span>
<select name="seasonid" onChange="[login to view URL](); [login to view URL]();">
<option label="Kategoria e Pare 11/12" value="3895" selected="selected">Kategoria e Pare 11/12</option>
<option label="Kategoria e Pare 10/11" value="2886">Kategoria e Pare 10/11</option>
<option label="Kategoria e Pare 09/10" value="2376">Kategoria e Pare 09/10</option>
</select>
</form>
</div>
Here you can see that the other seasons in this league is 3895, 2887, 2376
In each of these season page you can find the seasons tableid:
<input type="hidden" name="tableid" value="6189">
This tableid is to be used to find all the fixtures of the game:
<[login to view URL]>
I want this software to collect all the data from this site. Organize it in the following tables:
CountryTable LeagueTable TeamTable SeasonTable SeasonTeams MatchTable
**CountryTable** should have the following columns:
countryId, countryname
**League Table** should have the following columns:
LeagueId, LeagueName, CountryId(foreign key)
**Season Table** should have the following columns:
SeasonId, SeasonName, SeasonStartDate, SeasonEndDate, LeagueId(foreign key)
**Season Teams** should have the following columns:
SeasonTeamId, SeasonId(foreign key), TeamId(foreign key)
**TeamTable** should have the following columns:
TeamId, TeamName, CountryId(foreign key)
**MatchTable** should have the following columns:
MatchId, SeasonId(foreign key), HomeTeamId(foreign key), AwayTeamId(foreign key), MatchDate, IsPlayed(the game might have been canceled), hometeam half time score(if available), awayteam half time score(if available), hometeam fulltime score, awayteam fulltime score
The database must be an express 2008. I should be able to change database name and password on one place to make this program work.
These functions must be implemented in a static class:
Public static int[] getallseasons() //get all the seasons seasonid in the database
Public static int[] getleagues() //get all the leagues leagueid in the database
Public static int[] geallcountries() //get all the countries countryid in the database
Public static int[] getallteams() //get all teams teamid in the database
Public static int[] getallseasonfromcountry(int countryid) //get all the seasons from a country
Public static int[] getmatchesfromseason(int seasonid) //get all matches matchid from one season
Public static int[] getteamsmatches(int seasonid) //get all matches matchid from one season
Public static CountryCls GetCountry(int countryid) // returns a class called CountryCls
Public static LeagueCls GetLeague(int Leagueid) //returns a class called LeagueCls
Public static TeamCls GetTeam(int Teamid) //return a class called TeamCls
Public static MatchCls GetMatch(int Matchid) //return a class called MatchCls
Public static SeasonCls GetSeason(int SeasonId) return a class called SeasonCls
The following classes should also be implemented:
**Class CountryCls**
should have the following properties:
Int countryid, string countryname, List<TeamCls> Teams, List<LeagueCls> Leagues
It should have the following Methods:
List<MatchCls> LastPlayedMatches(int numberofmatches) //returns a list of the last played matches
List<MatchCls> MatchesToBePlayed(int numberofmatches) //return a list of the next coming matches
**Class LeugueCls**
Should have the following properties:
int Leagueid, string Leaguename, List<TeamCls> teams, List<SeasonCls> seasons, countrycls mycountry
It should have the following methods
SeasonCls GetLastSeason() //returns the last season
List<MatchCls> LastPlayedMatches(int numberofmatches) //returns a list of the last played matches
List<MatchCls> MatchesToBePlayed(int numberofmatches) //return a list of the next coming matches
**Class SeasonCls**
Should have the following properties:
int seasonId, string seasonname, List<TeamCls>, List<MatchCls>, datetime firstmatch, datetime lastmatch, leuguecls MyLeague
It should have the following methods:
List<MatchCls> LastPlayedMatches(int numberofmatches) //returns a list of the last played matches
List<MatchCls> MatchesToBePlayed(int numberofmatches) //return a list of the next coming matches
**Class TeamCls**
Should have the following properties:
int teamid, string teamname, List<SeasonCls> seasons//list of seasons with this team, List<MatchCls> matches
It should have the following methods:
List<MatchCls> LastPlayedMatches(int numberofmatches) //returns a list of the last played matches for this team
List<MatchCls> MatchesToBePlayed(int numberofmatches) //return a list of the next coming matches for this team
**Class MatchCls**
Should have the following properties: DateTime MatchDate, bool played, TeamCls HomeTeam, TeamCls AwayTeam, bool HalfTimeScores, int HomeTeamHalfTimeScore, int AwayTeamHalfTimeScore, int HomeTeamFullTimeScore, int AwayTeamFullTimeScore
All properties in these classes can be loaded when used. They don't/should not be loaded from database before use.
**The software should have a gui which does the following:**
**Click on a button, to update all the database. When doing this, it should get all the new data from the site. This function might take time, so there should be a progress bar.**
**Then there should be possible to List all countries, List all teams in a country, List all leagues in a country. For each league, list seasons. For each season, list all matches and team. For each team list all seasons and matches. All matches should display half time and full time result.**