Explain it in 60 seconds
Closure tables for hierarchies
Data Engineering · Data Modeling · Experienced
What is a closure table and why is it useful for deep hierarchies?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Stores every ancestor-descendant pair with the depth between them.
- Makes rollups to any level a simple join.
- Avoids recursive queries at report time.
- Must be rebuilt when the hierarchy changes.
- Useful for org charts, account hierarchies, category trees.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.