Major project for Data and Application course during Monsoon'20 semester
This miniworld is a scaled down replica of the Indian Premier League. We have tried to incorporate as many features which you would be able to access in the real world scenario. You have to ability to track statistics across multiple seasons. You can even find aggregate data from all the seasons put together.
To run this mini-world on your system you need:
- SQL Server
- Python Modules - PyMySQL and Tabulate
- To install MySQL in Windows use this link https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/windows-install-archive.html
For Ubuntu use this link https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04
For MacOS use this link https://database.guide/how-to-install-sql-server-on-a-mac/ - For Python Libraries run these commands on your terminal-
pip install pymysql
pip install tabulate
mysql -u username -p IPL < populatedDatabase.sql
mysql -u username -p IPL < database.sql
Use the first command if you want to use a populated database and test the features only. Use the second command if you want to use a fresh database which is not populated.
NOTE Make sure you create an empty database called IPL in your SQL server before running these commands.
- Use the command
python IPL.py
to start the CLI. - Enter your SQL username and password which you used to load the database.
- You will be shown a menu which shows the functions groups that can be executed.
- Upon selecting a group, a submenu will show up on your screen from which you can select a funtion of the group.
- For example pressing
1
will take you to the submenu for the add group. Upon pressing1
again you will be able to add a new player to the database. - If you are using the fresh database follow these steps to populate the database:
- Add a season.
- Add teams(at least 2).
- Add players(ensure that at least 2 teams have 11 players)
- Add Home Stadiums for your teams.
- Add Team Management for your teams.
- Now, you can add any number of matches between teams.
- You also have the option to end the current season and start a new one.
- You can search for Players, Teams, and Stadiums by name.
- You can also view statistics like the Orange Cap Winner(Most Runs) etc.
- To add a Team Captain, update the team from the update menu.
- Play around to use all the remaining features :)
The exhaustive list of requirements is below:
- Retrieve Players, Teams, Matches,Seaons, Stadiums.
- Retrieve all players and management of a particular Team.
- Retrieve overall top scorers or top scorers of currently running season in terms of runs and wickets.
- Retrieve position of a team in a particular season, position of a team across all seasons, and their points in the ongoing season.
- Calculate average total wickets and/or average total runs of a player in a particular season or overall.
- Search Players, Teams, Stadiums by name.
- Retrieve number of matches played in a stadium.
- Add matches, players, teams, seasons, stadiums, and Team management.
- Remove players, and team management.
- Update players, teams, and stadiums.
- Players
- Teams
- Batsman
- Bowler
- AllRounder
- TeamManagement
- Seasons
- Matches
- Stadium
- TeamStandings
- Plays
- Scorecard
- TeamResults
- PlayerScorecard