Nested set is a design pattern for representing hierarchies in relational database model.