Ask HN: DB wizards of HN, how do I represent a hierarchy in RDBMS?
The way I can represent this in RDBMS is by creating tables for each class, Pet, Animal, Cat and Dog. This way I am able to represent the hierarchy of Animal, Dog and Cat. My only concern is that the Animal table will grow rapidly as more pets and animal types are added and will be a performance issue.
Source: news.ycombinator.com