This paper presents a query translation mechanism between heterogeneous peers in peer-to-peer database sharing systems (PDSSs). A PDSS combines a database management system with P2P functionalities. In a PDSS, each peer chooses its own data model and schema, and maintains data independently without any global coordinator. One of the problems in such a system is translating queries between peers taking into account both the schema and data heterogeneity. Query translation is the problem of rewriting a query posed in terms of one peer schema to a query in terms of another peer schema. The proposed approach uses of user-provided syntax and data level mappings that each peer constructs and shares with other peers. Based on the mapping information, our algorithm applies translation rules to translate queries. The translation mechanism is evaluated on a prototype peer-to-peer network to demonstrate the viability of the approach.