More and more an Ontology is getting a key for grid platform to support the data combination of heterogeneous distributed resources. In this paper, we propose ontology-based data grid architecture for gathering large-scale distributed information of independent data sources by linking the ubiquitous computing middleware. This method that is not the keyword-based matching can bring closer results which human intend to acquire. The data grid system based on ontology is possible to access and integrate each distributed data of disperse databases around the world. In addition, this technique allows users to get more concise and abundant information. The architecture which is presented on this paper provides more effective way to search and retrieve data that users want to acquire from database by reducing the overhead of systems. So, the ubiquitous middleware core will obtain to have more affluent abilities as well as is able to be adopted for various fields.