Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Carey Brown
  • Frits Walraven

Bulk updates

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

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.


Posts: 10336
Hibernate Eclipse IDE 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.
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.

You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic