Data Model: World Cup 2018 by Viji Kumar - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub for a complete version.

Chapter 4 – The Knock-out Model

The games following the group phase are all decided after a single game and if the teams are drawn after 90 minutes, the options of 30 minutes of extra time and penalty shoot-outs are available. I shall use the Round 2 single-leg knock-out game at the Nizhny Novgorod Stadium on 1 July 2018 at 21:00 for illustration. From the sample data above, Argentina should be playing Peru (single-leg game ID: 1004).

Image

Image

The sample scoring data for the game are shown below. The goal scored in the 120th minute may have been scored in the last minute of the second period of extra time or during the subsequent stoppage time. This is an example of one of the shortcomings of this model and can be rectified by adding additional entity types to record stoppage time goals for the different periods of play.

Image

The penalty kicks that followed extra time had Peru taking the first kick. It was unsuccessful and was therefore not recorded. Argentina score with their first, fourth and fifth kicks. Peru score with their second and fourth kicks.

Image

It is a victory for Argentina. The deduction of the outcome is shown below.

Image

Image

Image

The model and the data for the qualification paths for the quarter-finals and the semi-finals are provided next.

Image

Image

The qualification data will produce the fixtures shown below for the quarter-finals and the semi-finals, again in accordance with the FIFA Dec 2017 rankings.

Image

All four teams in the semi-finals proceed to an apex game. The two losing semi-finalists contest the third-place game.

Image

The 2-attribute primary key of an apex game results in the use of a foreign key with 2 attributes but otherwise the same procedures are used to deduce the winner.

Image

Well, that’s the tournament model done folks.

Image