Because the geographical data are stored in different table and database, the fields are with the same meaning but different names and the data types are different, sharing data requires a middleware. In view of the heterogeneous data of the national basin water environment, a data sharing platform middleware was developed. The middleware was aimed to establish a kind of data mapping rules and editing mechanism, to shield the heterogeneity between heterogeneous databases, provide the users with the software with mapping and query functions of the basin water environmental risk factors between heterogeneous databases, and integrate a system based on the water environment risk assessment and early warning.