Some people will tell you that properly normalizing your tables is hard. It's not. The normalization rules are clear, and once you know all the functional dependencies in your data, you merely have to follow the rules carefully, taking care not to forget anything, and you'll always end up with a properly normalized design. The hard part comes before you can start normalizing-when you try to find all the functional dependencies. Considering how exact and well laid down the rules of normalization are, it's surprising to find that there are no similar rules for finding the functional dependencies. For what use is a set of rules that guarantees a correct model from a correct set of functional dependencies if there's no way to find that correct set of functional dependencies? In this article, I'll present a method to find all the functional dependencies. The only thing left for you to do is to find a domain expert who's willing to answer your questions.
Communication between domain experts and data modelers can be prone to misunderstandings. Once the interview gets beyond the basics, the domain expert can go into details that are far too advanced and complicated for the data modeler to understand, unless he's a domain expert himself. And questions asked by the data modeler are often so abstract that the domain expert might misunderstand them, unless she has lots of experience with data modeling herself. To minimize the chance of misunderstandings, I use a technique that's not used often in interviews, but has proven its worth many times: I use concrete examples (preferably in a notation familiar to the domain expert) instead of asking abstract questions. To illustrate the benefits of this interview technique, let's briefly assume that you, as a domain expert in the field of relational databases, are being interviewed by someone who has to make a data model for relational databases. At one point, this data modeler might ask you, "Can a table with a composite primary key be referenced by a foreign key constraint from more than a single table?" Before reading on, think about this question. Try to interpret what the data modeler wants, then answer the question. Now what if the data modeler had instead asked you this: "Suppose I have TableA with a composite primary key made up of the columns Foo and Bar, TableB with a column Foo among others, and TableC with a column Bar among others. Is it allowed to define a foreign key constraint from the columns Foo and Bar in TableB and TableC, referencing Foo and Bar in TableA?"
Would your answer still be the same? Or did you interpret the original question as being about two separate foreign key relationships, one from each of the referencing tables? I expect the latter, for after having worked with databases for some time, you've grown so accustomed to thinking in the patterns that make sense in the context of a database that you're bound to interpret an ambiguous question in those patterns. Although this illustrates the difference between an abstract question and a question asked by using a concrete example, it doesn't show you the benefit of using a notation that's familiar to the subject matter. But if you compare the data modeler's second question to the exact same scenario depicted as a database diagram you'll probably agree that this example makes the intention of the data modeler even easier to understand than either of the questions using words only. This demonstrates that you can reduce the chance of misunderstandings by using concrete examples, preferably in a notation that the domain expert is familiar with. But it doesn't help you to find functional dependencies. For that, you also need to know which questions to ask, and what conclusions to draw from the possible answers.
Our website is not responsible for the information contained by this article. Articleinput.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
Note: This article was sent to us by: Paul F. Taylor at 01072010
1. What can be used as a key in Python
All articles are property of their respective authors. Please read our Privacy Policy!
© 2009 ArticleInput.com.