Premier League Predictor: FastAPI & PostgreSQL — Chapter 9, Exercise 2 ==================================================== TASK Explain what "removing" a relegated team from next season's SeasonTeam set actually means in this implementation, and confirm whether that team's own historical record in the old season is affected at all. SOLUTION "Removing" a relegated team means exactly one thing in rollover_season: that team's row simply doesn't appear in the survivors list (since it's part of old_table's own bottom three, sliced off by old_table[:-RELEGATION_COUNT]), so no matching SeasonTeam row is ever created for it in new_season. Nothing is deleted, updated, or otherwise touched — the "removal" is really just an omission: the team is absent from the set of teams being carried forward, not actively taken away from anything. The relegated team's own historical record in the old season is completely unaffected. Its original SeasonTeam row for old_season_id was created back whenever that team was originally added to that season (Chapter 3), and rollover_season never queries, modifies, or deletes anything in the old_season's own SeasonTeam rows at all — it only reads old_table (built from fixtures and results, not from SeasonTeam directly) and writes new rows scoped to new_season_id. The relegated team's real record of having competed in that specific old season — and every fixture, prediction, and result tied to it — remains exactly as it was, permanently, matching Chapter 2's own original design that Team and SeasonTeam rows persist as real history rather than being overwritten or erased when circumstances change. WHY THIS WORKS AS AN ANSWER ---------------------------- It correctly identifies "removal" here as an omission (no new row created) rather than a deletion, and directly confirms — by pointing to exactly which rows rollover_season reads from and writes to — that the old season's own historical SeasonTeam data is never touched by this route at all.