Dealing with many-to-many relationships
In the previous chapter, Chapter 8, Data Modeling Components, we discussed different relationship cardinalities. We went through some scenarios to understand the one-to-one, one-to-many, and many-to-many cardinalities. We showed an example of creating a many-to-many relationship between two tables using non-key columns. While creating a relationship with many-to-many cardinality may work for smaller and less complex data models, it can cause some severe issues if we do not precisely know what we are doing. In some cases, we may get incorrect results in totals; we might find some missing values or get poor performance in large models; while in other cases, we may find the many-to-many cardinality very useful. The message here is that, depending on the business case, we may or may not use many-to-many cardinality; it depends on what works the best for our model while satisfying the business requirements. For instance, the many-to-many cardinality...