0

I'm currently trouble determining if one of my schemas is in third normal form.

I have a table with columns image_id (A), upload_time (B), uploader_id (C), and image_file (D). A is a key (unique identifier for every row in the table), and BC is also a key (every pair of uploader and upload time is unique). Thus, we have A -> BCD, and BC -> A (and transitively BC -> A through A -> BCD).

Is this table in 3rd normal form? I'm not entirely sure, because I know 3NF allows for a partial key transitive dependency (e.g. XY -> Z, Z -> X), but I'm not sure if it allows for a total key transitive dependency like I have above.

1
  • "Key FD" is not a clear way to say "FD with a key as determinant". "Key" is not a clear way to say "superkey" or "CK". And which do you mean? "Unique" means superkey, but a CK is an irreducible superkey; unique <> CK. You give FDs via those superkeys, but you don't say the only FDs are those they imply. BC is unique, thus BC->A & D. What does "transitively BC -> A through A -> BCD" mean? Or "allows for"? What "total key transitive dependency"? A->B transitively when there exists X [A -> X -> B and not X->A]. 3NF is iff no non-prime attribute is transitively dependent on a CK. Please clarify.
    – philipxy
    Mar 2, 2018 at 9:32

1 Answer 1

1

A simple check to see if a relation schema is in Third Normal Form is to see if every left hand side of non-trivial functional dependencies is a superkey (and this test can be used also to check if a relation is in Boyce-Codd Normal Form), or, if this is not the case, if every attribute on the right part is a prime attribute (i.e. part of any candidate key).

So in you case both the dependencies A → BCD and BC → A (and also BC → D) have a candidate key as left part, so the schema is in Third Normal Form (and in this case also in the more strict Boyce-Codd Normal Form).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.