<span lang="EN-US">The technique of extracting important documents from massive data collections is known as information retrieval (IR). The dataset provider coupled with the increasing demand for high-quality retrieval results, has resulted in traditional information retrieval approaches being increasingly insufficient to meet the challenge of providing high-quality search results. Research has concentrated on information retrieval and interactive query formation through ontologies in order to overcome these challenges, with a specific emphasis on enhancing the functionality between information and search queries in order to bring the outcome sets closer to the research requirements of users. In the context of document retrieval technologies, it is a process that assists researchers in extracting documents from data collections. It is discussed in this research how to use ontology-based information retrieval approaches and techniques, taking into account the issues of ontology modelling, processing, and the transformation of ontological knowledge into database search queries. In this research work, an efficient optimized ontology model with query execution for content extraction from documents (OOM-QE-CE) is proposed. The existing ontology-to-database transformation and mapping methodologies are also thoroughly examined in terms of data and semantic loss, structural mapping and domain knowledge applicability.</span>