Requirements Document in portuguese.
In this project, students will have to individually prepare the database to control the registration of football teams from an amateur league.
Each team must have the following information in its registration: Name, Surname and Date of Creation;
The Championship should initially have 3 teams, and up to 5 teams can be registered. Therefore, the games that should take place will be between Visitor and Home and can be up to 20 ((N - 1) * N xbecause each team doesn't play against itself).
We will have the following scorecard:
- 1 point for each team when DRAW
- 5 points for the winner that hit VISITORS WIN (AS VISITOR TEAM)
- 3 points for the winner that hit HOME WIN (AS HOME TEAM)
What will my bank/app have to show me?
- Who is the champion at the end of the championship?
- How will we check the top 5 teams in the championship?
- How will we calculate the score of the teams according to the games that have taken place?
- What would it look like with a trigger or how would it look with a stored procedure?
- Who is the team that scored the most goals in the league?
- Who has conceded the most goals in the league?
- Which game had the most goals?
- What is the most goals each team has scored in a single game?
![](https://private-user-images.githubusercontent.com/127906505/333362620-c0aa419e-6077-4efa-875d-c273a1b9a245.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4MDMwMDMsIm5iZiI6MTcyNDgwMjcwMywicGF0aCI6Ii8xMjc5MDY1MDUvMzMzMzYyNjIwLWMwYWE0MTllLTYwNzctNGVmYS04NzVkLWMyNzNhMWI5YTI0NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QyMzUxNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00Y2RjYWNhOTBlZjQxMWVhMTc2ODA5YjVkMTQ1YTdhZThmZWVhZDU1YWE4ZjIzNWM4NWMzN2M4MTIxZTJiZGQxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.pKGNDngs9VE5ytyA1D0TyS1RffbDGbUn_fw23uZUiTs)
Team (name, nickname, creationDate)
Championship (name, season, startDate, endDate)
Stats (Tname, Cname, season, pontuation, scoredGoals, sufferedGoals)
- FK Tname referencia Team (name)
- FK Cname referencia Championship (name)
- FK season referencia Championship (season)
Game (championship, season, visitor, home, homeGoals, visitorGoals)
- FK championship referencia Championship (name)
- FK season referencia Championship (season)
- FK visitor referencia Team (name)
- FK home referencia Team (name)
![](https://private-user-images.githubusercontent.com/127906505/333363146-0a36b573-6716-4032-ba1d-29ca99e72a1d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4MDMwMDMsIm5iZiI6MTcyNDgwMjcwMywicGF0aCI6Ii8xMjc5MDY1MDUvMzMzMzYzMTQ2LTBhMzZiNTczLTY3MTYtNDAzMi1iYTFkLTI5Y2E5OWU3MmExZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QyMzUxNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNGVhNDdmMmMyNzg3ODIxZDYwNmI3MTMwMjhlZDViODYxMmFjMTdmMTJiNDg1YzNmMDI5M2ZiMzkxNWU3MTE5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Y4-uuE4EdjpYqzEOZPzzjT8U_7l859QS_88diXCLSNc)
![](https://private-user-images.githubusercontent.com/127906505/333363234-ac47b24b-6243-4712-83ef-b70b6e5298aa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4MDMwMDMsIm5iZiI6MTcyNDgwMjcwMywicGF0aCI6Ii8xMjc5MDY1MDUvMzMzMzYzMjM0LWFjNDdiMjRiLTYyNDMtNDcxMi04M2VmLWI3MGI2ZTUyOThhYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyN1QyMzUxNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lZWIzNWJkMmQ5YjBhZjBiZmNhNzRhZDFiZjFkMGI1NjhkNDI4MTQwNzMxMmU4N2RkZjliM2E2Yzk1ZWEwNGFhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.t9noSc8N2fb9Va5eD--mKfQvYdjOeFEBT8mMTBrh57Y)
![](https://private-user-images.githubusercontent.com/127906505/333363337-e1d93295-0532-4ee5-a4be-02d80d635022.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ4MDMwMDMsIm5iZiI6MTcyNDgwMjcwMywicGF0aCI6Ii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