Microsoft Office Tutorials and References
In Depth Information
Complex Relationships
The denormalization process that you have seen up to now works well with simple tables that
follow simple or chained relationships. The AdventureWorks database, like any other relational
database, often contains much more complex relationships that will really test your judgment.
We are going to use, as an exercise, a diagram for the Customer table, which is implemented
in AdventureWorks in a complex way (see Figure 4-25). The purpose of this example is to show
how complex the querying of a database might be, so it is a deliberately difficult sample.
FIguRE 4-25 The relationship diagram for Customer.
You can see that the business entity Customer is represented by several tables that have
complex relationships among them.
Sales_Customer is in relation with Sales_Individual, which stores some demographic
information about the customer.
Sales_Individual, in turn, refers to Person_Contact, through the ContactID column.
Person_Contact contains the personal data of any contact, and from the database
point of view, a customer is a contact. So Sales_Customer is in chained relationship
with Person_Contact.
A customer row might have different addresses, so the table Sales_CustomerAddress
contains all the addresses of a Sales_Customer row.
All addresses have a related Person_AddressType, which categorizes the address. The
main address of the customer has a type (value in AddressTypeID field) called Primary.
Search JabSto ::




Custom Search