In volleyball you usually have the best of five
rule. That means there are max 5 sets than can be played. The first ones until 25
and the last one until 15
. The score might looks like this:
25:23 - 23:25 - 25:16 - 11:25 - 15:10 => Team A wins against Team B 3:2
25:10 - 25:21 - 25:13 => Team A wins against Team B 3:0
For training or in school you might also want to play best of three
, e.g.
25:13 - 11:25 - 15:10 => Team A wins against Team B 2:1
25:13 - 25:10 => Team A wins against Team B 2:0
You could also say that the set lengths aren't until 25
but 15
, e.g.
15:13 - 11:15 - 15:10 => Team A wins against Team B 2:1
15:13 - 15:10 => Team A wins against Team B 2:0
So when you start a match you choose the number of max. sets (5
or 3
) and the set length (25
or 15
).
How would you store this in a normalized database? At the moment my schema looks like this.
id | name | set_lengths
----------------------------------------
1 | men bronze | [25, 25, 25, 25, 15]
2 | woman final | [15, 15, 15]
In the last weeks I read a lot about normalization and as far as I understand using arrays is not really normalized. Any ideas how I could achieve this without using arrays?