An apparatus for modifying a database storing encrypted data for searching the database over the encrypted data, wherein the apparatus is configured to: access the database comprising a plurality of data instances encrypted using a non-deterministic encryption method, wherein each data instance includes at least one data entry; the database including a first unique identifier entry stored in association with each respective data instance of the plurality of data instances; create, for each data instance of the plurality of data instances, a respective second unique identifier entry, the respective second unique identifier entry being created by: applying a mapping function to the data instance to generate a mapped value; applying a first secure compression function to a hash-key and the mapped value to generate a first hashed-value; applying a second secure compression function to the first hashed-value and the first unique identifier entry associated with the data instance to generate the second unique identifier entry; and storing within the database the second unique identifier entry associated with the respective data instance of the plurality of data instances as an entry added to a row storing the respective encrypted data instance, wherein the second unique identifier entry comprises a plurality of dimensions allowing for a search query to be defined over the plurality of dimensions; and output the database for searching over encrypted data instances stored in the database. access the database comprising a plurality of data instances encrypted using a non-deterministic encryption method, wherein each data instance includes at least one data entry; the database including a first unique identifier entry stored in association with each respective data instance of the plurality of data instances; create, for each data instance of the plurality of data instances, a respective second unique identifier entry, the respective second unique identifier entry being created by: applying a mapping function to the data instance to generate a mapped value; applying a first secure compression function to a hash-key and the mapped value to generate a first hashed-value; applying a second secure compression function to the first hashed-value and the first unique identifier entry associated with the data instance to generate the second unique identifier entry; and storing within the database the second unique identifier entry associated with the respective data instance of the plurality of data instances as an entry added to a row storing the respective encrypted data instance, wherein the second unique identifier entry comprises a plurality of dimensions allowing for a search query to be defined over the plurality of dimensions; and applying a mapping function to the data instance to generate a mapped value; applying a first secure compression function to a hash-key and the mapped value to generate a first hashed-value; applying a second secure compression function to the first hashed-value and the first unique identifier entry associated with the data instance to generate the second unique identifier entry; and storing within the database the second unique identifier entry associated with the respective data instance of the plurality of data instances as an entry added to a row storing the respective encrypted data instance, wherein the second unique identifier entry comprises a plurality of dimensions allowing for a search query to be defined over the plurality of dimensions; and output the database for searching over encrypted data instances stored in the database. <EOS>