I have a table with one single text column(there are some other columns. But they are irrelevant here). The values in this column can contain duplicates. The table doesn't have any primary key or other unique data to individually identify each row.
The text was previously encrypted using Blowfish algorithm. But we are now planning to encrypt the text using AES.
So we take a batch of rows from the table and then run it through our java code, which does the conversion from Blowfish to AES. But, since we don't have a unique key to identify the row, how do I make sure that we are updating the correct column.
I can think of two ways to do this. 1) Add a auto-incrementing primary key/unique key to the DB. Which although is ideal, will result in lots of code changes in our application. 2) Do the update using rownum, in some weird way. I am concerned about the data-integrity with this approach.
Is there any other way to do this? or What the best approach?
We are using an Oracle SQL DB and JDBCTemplate.