A novel robust watermarking algorithm based on the second-LSB (least significant bit) is proposed. The algorithm first groups the data by the hash value of the primary key and positions with the second-LSB of the data in every group. The watermark is not directly embedded in one single item, but one bit is embedded into one group by setting a pseudo-random number to the LSB of the data. A threshold, which is used for detection to be compared with the occurrence frequency of LSB positioned in embedding, and set according to the distribution probabilities of the data. Without affecting the usability of the data, the watermark is scattered in the databases evenly and hard to be detected. What's more, it keeps the distribution of the data. Experiments have shown that the algorithm is robust against various forms of attacks.