Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Actually, I'm not sure I agree. </p> <p>If you have a "round" field in the "match" table, you introduce the possibility of integrity problems, as you end up with a row in your table for each round (which doesn't really make sense as this is the "match" table, so there should only be one row per match)</p> <p>If you do that, each row could potentially have a different set of participants in it, which is likely not your intention and indicates that you should key "round" out to a different table. Other integrity problems introduced would be the "Winner field" e.g. if you list the winner of the round in the match tables, how do you know who won the match? If you just put the winner of the match across all rows, you lose the information about who won the round.</p> <p>To be appropriately normalised, create, say a "MatchRound" table.</p> <p>Give your Match table a primary key (call it Match_Id for example) and then your Round table could have: Round_Id (autonumber or similar unique primary key), Match_Id (which is a foreign key to the match table) and perhaps RoundOrder and RoundType (Final, Semi, etc). You're probably also okay adding Winner and Loser to this table.</p> <p>While dual-purposing the round_number field for semis/quarters etc would work, it only works if the topology is consistent across matches, e.g. there are always quarter finals? Some sports accumulate points for example, and then have only a final. For this reason, I'd just create RoundType text field.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload