Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bulk updates

 
Rohit Dhodapkar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to have your suggestions on this. I have a database table with 3 million Credit Card numbers. The requirement is to encrypt all the 3 million cards. So I have to retrive card number encrypt it and update it on the table. Can anybody suggest the safest and most efficient way of doing this? Should I use EJBs or simple JDBC calls would be good enough. I am using oracle database.

Thanks,

Rohit
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd just do it in Oracle. Oracle supports Java, and Java has packages for encryption. You could just write a procedure to go through the table encrypting easch row. No need to pull data out of Oracle and add the overhead of a network connection.
 
Alan Christen
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have to use Java for this.

Look at using the Oracle functions HexToRaw() and RawToHex() with a stored procedure and CTAS (CREATE TABLE ... AS). You won't event have to suck the data out.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic