More on Many-to-Many Relationships
Unlike the object model, the traditional relational model does not support many-to-many relationships. In this XML model for example, a cardigan sweater (men's, size medium) could refer to many color swatches. Inversely, a given color swatch could refer to many different types of sweaters of various sizes. This is a many-to-many relationship.
In the relational model, these relationships are represented using intersection entities. This figure illustrates the schema with the intersection entity of Size Color.
These intersection entities, if they are left in the model in this way, will require additional joins that slow down the mapping process to the XML model. One approach to this situation is to "de-normalize" these intersection entities by restricting the number of colors that a catalog item can have. The outcome of such an approach might be to increase maintenance costs; the model no longer accurately represents the real world, which might require a change in the future. Data changes such as these can also have ripple effects on the code.
More on the general topic: Many-to-Many Relationships
Related Fact Book and Implementation Stories
You may use this material for your work or classes. Reprint Policy. Be sure to check the menu at the left for other articles available on this site.
The Savvy Manager's Guide
Douglas K Barry is also the author of a book that explains Web Services, service-oriented architecture, and Cloud Computing in an easy-to-understand, non-technical manner.
Web Services, Service-Oriented Architectures, and Cloud Computing: The Savvy Manager's Guide (Second Edition)
by Douglas K Barry with David Dick
This is a guide for the savvy manager who wants to capitalize on the wave of change that is occurring with Web Services, service-oriented architecture, and—more recently—Cloud Computing. The changes wrought by these technologies will require both a basic grasp of the technologies and an effective way to deal with how these changes will affect the people who build and use the systems in our organizations. This book covers both issues. Managers at all levels of all organizations must be aware of both the changes that we are now seeing and ways to deal with issues created by those changes.