Converting Data to Relational Tables


On This Page

Identify Entities

Top of page  

Domain Decisions

We had to make some non-technical decisions, which in the corporate world might be called "redesigning our business processes." In our scenario, we decided that all skill levels would be recorded as percentages, so a 70 is 70 out of 100 possible points. We also made the decision that percentages will not include any decimal points — integers only. That also meets the relational requirement that an attribute have a domain. In this case, the domain for a skill level is an integer between 0 and 100. You'll also notice that we conserved space by using a single-letter code for sex: M=Male, F=Female, and U=Unknown. We can programmatically enforce these domains, either in the applications or through triggers (more on triggers in a following page).

From here on, I'll refer to columns as fields, and rows as records. As you can see, the order of the records doesn't change the data, there are no duplicate records, each record has the same number of fields (making it a two dimensional table), any given field is of the same data type, and all the fields have a domain. This last characteristic isn't obvious, but when working with a database tool, you would define a field's domain. For example, you would set "First Name" to accept characters, with a maximum length of 30. By setting this field to be required (often called a "Not Null" constraint) we enforce a domain of "at least one character, but no more than 30 characters."

Top of page  

What's Still Wrong?

Our data may be stored in a relational database, but there are some serious flaws in this table. Let's identify the problems before we solve them using normalization.

Top of page  

Copyright © 1995 Craig Edward Given