简体   繁体   中英

update oracle DB data from CSV file using Hibernate

Need to update oracle DB table with data from CSV using hibernate. Is there any prepared statement batch update equivalent in Hibernate or Is there any optimal Hibernate approach in updating DB data from CSV?

Hibernate is one of the ORM tools.

Object-relational mapping (ORM, O/RM, and O/R mapping tool) in computer science is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language.

It means using ORM you have to:

  1. deserialize data from CSV
  2. map it to the objects
  3. then serialize objects and store it to relational DB .

Don't you find it redundantly?

Is there any optimal Hibernate approach in updating DB data from CSV?

The answer is not. There is no any optimal Hibernate approach because it's redundant meaningless work to use ORM. In this case plane DAO layer is much more effective and suitable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM