Parent-child relationship
A parent-child relationship is a hierarchical association in which one entity or component contains, governs, derives, or organizes another.
API Design Patterns
A hierarchical relationship is a parent-child relationship in which resources occupy different levels of an ordered structure.
- How it is used
- Models resource ownership when deletion, access, or other behavior should cascade from parent to child.
- How deep it goes
- Defines ownership, single-parent structure, cascading deletion, and access inheritance, but stops short of implementation mechanics.
- Examples
- Uses company directories, ChatRoom and Message resources, and Book and Shelf identifiers to distinguish ownership from association.
- What you can do after
- Evaluate whether a relationship represents ownership and choose hierarchy or a reference relationship accordingly.
Read how API Design Patterns explains parent-child relationship →
D3.js in Action, Third Edition
A parent-child relationship is a directed association in which one hierarchical item is the parent of another item.
- How it is used
- Structures flat CSV records so D3 can generate hierarchical visualizations.
- How deep it goes
- Explains column encoding and implements conversion with D3 stratify, then exposes roots, descendants, and leaves.
- Examples
- Uses Languages, language families, branches, and individual languages in a CSV table.
- What you can do after
- Build it from scratch by encoding CSV relationships and converting them into a D3 hierarchy.
Read how D3.js in Action, Third Edition explains parent-child relationship →
Related concepts
- join data typeused by · The join data type is an Elasticsearch field type that represents parent-child relationships between documents in the same index.
- lifecycle dependencyuses · A lifecycle dependency is a dependency in which the existence or removal of one object governs the existence or removal of another object.
- referencekind of · A reference is an indirect value or relationship that identifies or provides access to another value, object, resource, or source.
- one-to-many relationshipcontrasts with · A one-to-many relationship associates one instance of an entity with multiple instances of another entity, each of which is associated with at most one instance of the first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

