Can you have a composite key when in Third Normal Form (3NF)?

9.7k views Asked by At

I must normalise table data to 3NF.

I have a composite key from 1NF, but all of the non-key attributes appear to be reliant on both of the primary key attributes. I'm trying to take it from 2NF into 3NF. Can I still have a composite key?

1

There are 1 answers

0
Mike Sherrill 'Cat Recall' On

You can have a compound key in every normal form.

In fact, when you write functional dependencies in the form A->B, both A and B refer to sets of attributes. That's why they're in uppercase; uppercase letters represent sets in set theory.

...all of the non-key attributes appear to be reliant on Both of the primary keys...

There's only one primary key. In your case, that one primary key has more than one attribute.

There might be more than one candidate key, though. In normalization, every candidate key is equally important. For example, if you're trying to identify transitive dependencies, you need to look for transitivity with respect to every candidate key, not just the primary key.