# Equivalence of Tidy Data and Third Normal Form

In Hadley Wickham's "Tidy Data" paper, he states that

In tidy data:

1. Each variable forms a column.
2. Each observation forms a row.
3. Each type of observational unit forms a table.

This is Codd’s 3rd normal form (Codd 1990), but with the constraints framed in statistical language, and the focus put on a single dataset rather than the many connected datasets common in relational databases.

Codd's Third Normal Form can be described as:

1. A table is in 1st normal form if

• It stores information in rows and columns where one or more columns, called the primary key, uniquely identify each row.
• Each column contains atomic values, and there are no repeating groups of columns.
2. A table is in 2nd normal form if

• The table is in 1st normal form, and
• All the non-key columns are dependent on the table’s primary key.
3. A table is in 3rd normal form if

• It is in 2nd normal form, and
• It contains only columns that are non-transitively dependent on the primary key

I am trying to understand how these two sets of rules are equivalent.

I believe that the first Tidy Data rule maps to 1st normal form. Specifically, "Each variable forms a column" maps to "Each column contains atomic values, and there are no repeating groups of columns".

I believe the Tidy Data rule "Each observation forms a row" maps to "All the non-key columns are dependent on the table’s primary key" and also "It contains only columns that are non-transitively dependent on the primary key".

I suspect that "Each type of observational unit forms a table" maps to "The table stores information in rows and columns where one or more columns, called the primary key, uniquely identify each row", but I'm least sure about this mapping.

I believe my above analysis is not (quite) correct, so I'm hoping someone can clarify the link between these two sets of rules.

My question is: How are the three aforementioned Tidy Data rules equivalent to Third Normal Form?