A service-oriented architecture provides a standards-based platform that allows services to be provided, discovered, configured, and integrated, to facilitate that creation of a business process. Data Grid is a service-oriented architecture that provides the coordinated search services for data distributed across remote resources. Research and development activities relating to the Grid have generally focused on application where data is stored in database which is called Hidden Web. To answer user queries, a data integration system employs a set of request semantic analyzing, keywords searching, and modeling creating on Grid. This paper presents a novel model of searching, which the database is an undirected graph, of which each node correspond to a tuple of the database, and each edge correspond to a “primary key – foreign key” link. Results to a query are modeled as answer trees connecting tuples that match individual keywords in the query. This paper also presents a novel and efficient searching algorithm of dynamic programming. This algorithm is employed in our model to ensure the Top-1 answer tree optimal and Top-K answer trees nearly optimal. Finally, the algorithm’s performance is tested and evaluated.