As the relational database be the main data storage mode, but the traditional keyword based syntactic matching defects in precision and recall. This paper provides a ontology matching mechanisms for relational database, which realizes the semantic level of the data retrieval by using the intelligent search technology from Agent and Ontology. The mechanism using DCL domain ontology, SQC services query policy, SearchPolicyMap mapping to solve the problems as data object description, retrieval conditions description, and the mapping between those two description. And provided the preconditions for the semantic matching under the relational database. Solve the semantic matching problem of interaction between human and Agent by the WI interface and CM mechanism . Solve the problem of interaction between Agent and relational database by the service customization Interface SBI. Finally, solve the problem of semantic retrieval and quantitative calculation by querying adapter QA and core algorithm CMA. The mechanism has a strong practicality and application domains independent. Can implement a specific level semantics of relational database retrieval through the application domain ontology creation and mapping configuration.