Data exchange and data publishing are becoming an important part of business and academic practices. Data owners need to maintain the rights over the datasets they share. A right-protection mechanism can be provided for the ownership of shared data, without revealing its usage under a wide range of machine learning and mining. In the approach provide two algorithms: the Nearest-Neighbors (NN) and determiner preserves the Minimum Spanning Tree (MST). The K-NN protocol guarantees that relations between object remain unaltered. The algorithms preserve the both right protection and utility preservation. The right protection scheme is based on watermarking. Watermarking methodology preserves the distance relationships.