2

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?

philipxy
  • 14,867
  • 6
  • 39
  • 83
Mcar49
  • 307
  • 3
  • 11
  • It is not helpful to normalize to 2nf then 3nf. Just use one of the lossless 3nf decomposition algorithms. (There are 3nf decompositions of a relation that are not 3nf decompositions of any of its 2nf decompositions.) – philipxy Nov 24 '14 at 09:23

1 Answers1

3

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.

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185