Inspiration
What it does
How we built it
Challenges we ran into
Accomplishments that we're proud of
What we learned
What's next for World Cup Database
World Cup Database Project Story Inspiration My inspiration for building the World Cup Database came from my love for football and my curiosity about how data can reveal patterns in sports. I was fascinated by how statistics such as team performance, player goals, and match outcomes can be used to analyze trends across different World Cup tournaments. I wanted to create a database that could not only store this information but also allow me to query it in meaningful ways to answer questions like: Which country has the highest goal-per-match ratio? Who are the top scorers in World Cup history? How has team performance evolved over time? This project allowed me to combine my interest in sports with my skills in database design and SQL. What I Learned Working on this project taught me several valuable lessons: Database Design Principles – I learned to design tables with proper normalization to reduce redundancy and ensure data integrity. For instance, I separated Players, Teams, Matches, and Goals into distinct tables linked with foreign keys. SQL Querying – I practiced advanced SQL queries, including: Aggregation functions: SUM(), COUNT(), AVG() Joins across multiple tables: INNER JOIN, LEFT JOIN Filtering with WHERE, HAVING, and BETWEEN Ranking and ordering results using ORDER BY and window functions Data Cleaning and Validation – Real-world datasets often contain missing or inconsistent data. I learned to clean and validate the dataset before importing it into the database. Problem-Solving – I faced scenarios where queries became complex due to multiple relationships (e.g., linking players to teams and goals in a single query). I learned to break problems into smaller, manageable steps. How I Built the Project Data Collection I collected World Cup data from trusted sources such as FIFA statistics pages and Kaggle datasets. The data included: Teams: Name, FIFA code, confederation Players: Name, position, team Matches: Year, teams, scores, location Goals: Player, match, minute Database Design I created an ER diagram to visualize the relationships: Each table had a primary key, and foreign keys were used to maintain relationships. Implementation I used MySQL to create the database and tables. After importing the cleaned data, I wrote SQL queries to answer specific questions like: Total goals scored per country per tournament: SQL SELECT t.name AS Team, SUM(g.goals) AS TotalGoals FROM Teams t JOIN Players p ON t.team_id = p.team_id JOIN Goals g ON p.player_id = g.player_id GROUP BY t.name ORDER BY TotalGoals DESC; Top 10 goal scorers in World Cup history: SQL SELECT p.name, t.name AS Team, SUM(g.goals) AS Goals FROM Players p JOIN Teams t ON p.team_id = t.team_id JOIN Goals g ON p.player_id = g.player_id GROUP BY p.name, t.name ORDER BY Goals DESC LIMIT 10; Analysis and Visualization I exported query results to Excel and Python (Matplotlib) for visualization, creating charts to show trends like the increase in goals per tournament or top scoring countries. Challenges Faced Data Inconsistencies: Some datasets had missing player positions or incorrect match scores, which required careful cleaning. Complex Joins: Queries involving multiple tables sometimes returned unexpected results due to missing foreign keys, forcing me to revisit the database design. Handling Large Datasets: As more tournaments were added, queries became slower. I learned to optimize them using indexes. Visualization Integration: Combining SQL results with Python plotting required careful formatting to ensure accuracy. Conclusion This project strengthened my skills in database design, SQL querying, and data analysis, while allowing me to explore my passion for football. I now feel confident building databases that not only store information efficiently but also allow complex queries to generate meaningful insights. The World Cup Database is not just a collection of data—it’s a tool to explore the history and evolution of the beautiful game.
Log in or sign up for Devpost to join the conversation.