In national geology grid(NGG) environment,applications are developed with distributed geologic data. To facilitate application, a uniform data integration framework should be provided. For geologic application-s characteristics, the data integration systems should focus on maintaining dynamic data resource information, searching among heterogeneous data and coordinating constrain relations in the distributed environment. For the needs, a service oriented architecture(SOA) based mechanism for data resource integration was proposed. In the mechanism, a layered data information structure that was consisted by virtualized local data resource information and global data view for searching was implemented. Uncertainty of dynamic data resource was hidden by the structure through which application accessed data uniformly. Constrain relations between data that were maintained in the global data view were checked through triggers of local data base(DB) system and web services. Coordination among heterogeneous data base management system(DBMs) was realized. Based on the mechanism, a middleware named NGG-DBMs has been constructed and serves for NGG.