The aim of the project is collecting the similarity queries from various users and stored in thedatabase. In this paper, we are mainly concentrating on privacy only. Here data owner, service provider,trusted clients are used. Here it is able to maintain data confidentiality with respect to untrusted partiesincluding the service provider. Data owner and service provider and trusted client are used. Data owner isone who stores the data in the database. Here service provider is the third party who maintains the data in thedatabase. Trusted client is one who needs the data from the database. In this paper the data owner providethe privacy to the sensitive information .Here I took medical related information so I collected the medicalrelated data and stored in my database such as fever, headache and diabetes disease related information.Here all the data’s are stored in the hierarchical order in a subject wise or age wise or disease wise. Thecloud computing setting in which similarity querying of metric data is outsourced to a service provider. Onlyauthorized users are allowed to access the data. Nobody else including the service provider should be able toview the data. So that data will be kept private. Based on the queries it will be revealed to the trusted usersalone. This transformation technique offers perfect data privacy for the data owner but it gives the finalresult at multiple rounds of communication. This technique also provides an interesting trade-off betweenquery cost and accuracy. Existing solutions either offer query efficiency at no privacy or they offer completedata privacy while sacrificing query efficiency. But the proposed methods are very secure and efficient.