char_id* power_id* 1 1 1 2 1 3 (Web host)

char_id* power_id* 1 1 1 2 1 3 2 4 3 1 3 5 3 6 As you can see, you have much less repeated data than you did before. The powers have been separated out, and a link table has been created to link each power to each appropriate character. It may seem a bit nitpicky, but you still have some duplicate data that you can take care of in the character table. It is quite possible for more than one character to be in the same lair, as is the case with Clean Freak and Soap Stud. Create a lair table, and link it to the character table with keys. Also add a new column to the character table for alignment. See the two tables that follow. id* lair_id name real name align 1 1 Clean Freak John Smith Good 2 1 Soap Stud Efram Jones Good 3 2 The Dustmite Dustin Hare Evil id* lair address city st zip 1 123 Poplar Avenue Townsburg OH 45293 2 452 Elm Street #3D Burgtown OH 45201 We waited to add the alignment column to illustrate a point. If you are in the middle of the normalization process, and discover that there is some other data you need to add, it isn t difficult to do so. You could even add a completely new table if you needed to. That is one of the great things about relational database design. The city and state fields are not only duplicates, but they are redundant data with the ZIP code (which is in itself a representation of the city/state). City and state are also not directly related to the lairs (because other lairs could exist in the same city). For these reasons, you will put city and state in a separate table. Because the ZIP code is numeric, and a direct representation of city/state, you will make the zip column a primary key. This is pass three, shown in the three tables that follow. 281 Building Databases
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Leave a Reply