1

I"m studying normalization and have been reading through descriptions and examples online. One Concept that isn't clear to me is if the process can be automated at any point. I understand that a system can't tell you if you schema makes any real-world sense, but it seems likely to me that if you feed a program some arguments say, the functional dependencies, it would be able to do some steps for you.

Say you have a relationship R(A,B,C,D)

and you tell your program that A,B->C and A->D and that the primary key is (A,B)

Now if my understanding serves me correctly it should be possible for a program to identify that A->D violates 2NF because D depends on A and A is a subset of the primary key. That the proper decomposition would be R1(A,B,C) and R2(A,D).

The main book i'm learning from and my instructor indicate these normalization's are done all by hand. Is this correct or can some parts be automated?

1

Normalization to Boyce-Codd Normal Form, 5NF or 6NF (and therefore to any "lesser" NFs) certainly can be automated. Google for Bernstein's alogrithm for a simple example of how.

There is frequently more than one way in which a set of dependencies can be normalized to any given Normal Form. Again, there are formal methods that can help you choose. Typically we want a database that is not just normalized but also dependency-preserving.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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