Oracle provides an easy way to deal with a hierarchy relationship within a database, through a type of query called a hierarchical query. The query allows you to use the hierarchy relationship as the criteria for showing records. Here is a simple version of this query using the EMPLOYEES table from the HR sample schema.