Database Reference
In-Depth Information
F IGURE 8.5
An example of using too many entities to represent an address in a data
model
fore you go over the top. Figure 8.5 shows an example of what is, in our
opinion, a model using too many entities.
Now, this is, in most cases, a perfect example of using too many enti-
ties. We have indeed followed normalization rules—each entity pertains to
only one grouping of data—but the performance implications of stitching
this data back together are enormous. Unless you have a compelling rea-
son to do something like this, such as building a data model for the post of-
fice, then we recommend that you avoid this tactic. That said, we have
worked with an application that implemented a version of this, but it was
only two tables. Street address information was stored in the Address en-
tity, and that contained a foreign key to an entity called ZipDetail. The
ZipDetail entity held the ZIP code, city, state, and country information.
This particular application stored a lot of address data, and breaking out
 
Search WWH ::




Custom Search