When is a table in third normal form (3NF)?

A table is in third normal form (3NF) if it is already in second normal form (2NF) and does not contain any transitive dependencies. This means that each non-key column depends only on the primary key column and not on any other non-key column. In other words, every non-key column should be directly related to the primary key of the table.

A table is in third normal form (3NF) when it meets the following conditions:

1. It is already in second normal form (2NF).
2. All non-key attributes are dependent on the table's primary key or transitive dependencies on the primary key have been removed.

To further explain:

1. Second Normal Form (2NF) requires that each non-key attribute in the table is fully dependent on the entire primary key. It means that there should be no partial dependencies where an attribute is dependent on only a portion of the primary key.

2. Third Normal Form (3NF) requires that all non-key attributes are dependent on the primary key and there are no transitive dependencies. Transitive dependencies occur when an attribute is functionally dependent on a non-key attribute which is itself dependent on the primary key.

In simpler terms, a table is in 3NF when all non-key attributes are directly related to the primary key, and there are no indirect relationships between non-key attributes.

To summarize, a table is in 3NF when it satisfies 2NF and has eliminated any transitive dependencies.