It is not about repeating data but about functional dependencies.
A relation scheme R is in 3NF with respect to a set of functional dependencies F if it is in 1NF and no nonprime attribute in R is transitively dependent upon a key of R.
A database scheme D is in 3NF if every relation scheme R in D is in 3NF with respect to F.
- David Maier in The theory of relational databases
To prevent misunderstandings:
- The “relation scheme R” means a table in an RDBMS.
- A prime attribute of R is an attribute contained in some key of R. Nonprime are the others.
- A is transitively dependent on a key K means that there is an attribute (a column) X that is dependent on the key (i.e the value of K determines X) and A is dependent on X (i.e. the value of X determines A).
The redundancy that 3NF tries to prevent, is that in the same table you have redundant depedencies, i.e. that a same attribute is on one side determined directly by a key and at the same time indirectly via another attribute.
Example: imagine a table with columns
cc (country code),
country. In this example, the
coutry. The problem is that looking closer,
cc also determines
country. So here a nonprime is transitively dependent upon a key and it’s not 3NF.
Now, get rid of the last column, and create a separate table with
country, removing all the duplicates. This new database scheme would be 3NF, despite the fact that
cc is repeated with same values in two tables.
In your example, no nonprime in any table seems transitively dependent upon a key in the same table, since all the attributes shown are part of the primary key. So it’s 3NF.
Your final question about breaking any database rule seems a little bit too broad and would need refinement. What exactly are you worried about?