Recursive Relationships
A recursive relationship is a non-identifying relationship between two entities or tables that represents the fact that one company can own another company. In this type of relationship, the parent entity or table and the child entity or table are the same. You can create these two types of recursive relationships:
- Hierarchical Recursive (single-table recursion). In this type of relationship, a parent entity or table can have any number of children, but a child can only have one parent.
- Network Recursive (double-table recursion). In this type of relationship, a parent entity or table can have any number of children, and a child can have any number of parents.
In network recursion, an entity or table has a many-to-many relationship with itself. When a many-to-many network recursion problem exists, you can clarify the situation by creating an intermediate entity or table and converting the many-to-many relationship into two one-to-many relationships. In both types of recursive relationships, you must assign rolenames to migrating foreign keys to capture the meaning of the recursive relationship.
A recursive relationship must be a non-identifying relationship for these reasons:
- In an identifying relationship, the primary key of the parent would become a subset of the primary key of the child.
- The key attributes or columns could not have a NULL value.
- The entity or table would be a parent of itself. The migrated key would perpetually migrate.
Copyright © 2020 erwin, Inc.
All rights reserved.
|
|