In practical database evolution, how common is the need to change relationship cardinalities (for example, from one-to-many to many-to-many) as requirements evolve?

Difficulty: Easy

Correct Answer: a rare database design task, but does occur.

Explanation:


Introduction / Context:
Cardinality expresses how many rows in one table can relate to rows in another. Real-world businesses evolve, and occasionally the original assumptions about cardinality change (for example, a customer previously allowed a single active contract may now hold multiple). This question asks how common such changes are.



Given Data / Assumptions:

  • Initial models reflect business rules at a point in time.
  • New products or policies may alter constraints and participation rules.
  • Changes to cardinality can affect keys, constraints, and bridge tables.


Concept / Approach:

Cardinality changes are not everyday events, but they do arise. Adjustments may require adding junction tables, changing unique constraints, or modifying optionality. Because the blast radius can be large, these tasks are less frequent and are planned carefully with data migration and application changes.



Step-by-Step Solution:

1) Confirm the new business rule with stakeholders.2) Adjust schema (for example, add a bridge table for many-to-many) and constraints.3) Migrate existing data to conform to the new model.4) Update application logic and reports accordingly.


Verification / Alternative check:

Use data profiling to locate rows that violate the new or old rules and to estimate migration complexity.



Why Other Options Are Wrong:

Common: overstates frequency; many systems keep stable cardinalities for long periods.

Never or impossible: incorrect; schema evolution is feasible with planning.



Common Pitfalls:

Failing to add correct constraints after the change, leaving the data model ambiguous; not remodeling related processes and reports.



Final Answer:

a rare database design task, but does occur.

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion