Extracting semantic relationships between entities and objects has become very challenging with the development of Big Data, Semantic Search Engines, and Semantic Question Answering systems. It has become an important research topic in recent years and is more valuable in the fields of biomedicines, Taxonomies, Health Care Informatics, etc. When taxonomies are studied and examined semantically, the problem of relationship detection arises. This research presents a computation technique to make it fast and efficient by employing a very important Graph Theory technique. This technique is used in semantic hierarchal relationship extraction in taxonomy. Our study illustrates that the Depth First Search Algorithm can best contribute, to detect hierarchal relationships and can be applied in the performance improvement from a semantic aspect. The research proposes a simple computation technique SSM5 for hierarchal relationship detection from taxonomies using Ontology. The technique can be used in an extensive range of applications in domains like Taxonomies, Biomedical Literature Mining, Business Intelligence, Unstructured Electronic Text on the Web, and Semantic Information Retrieval.