Forum: Building VoltDB Applications

Post: Hibernate support for VoltDB

Hibernate support for VoltDB
May 18, 2015

I'm new to VoltDB and currently trying to migrate my present database from MySQL 5.5 to VoltDB. Since the current setup uses Hibernate/JPA, changing the entire DAO layer using JdbcTemplate for simple insert and update statements has become a cumbersome job. Does VoltDB now provide support for Hibernate?

Please let me know if there's a simpler method for migration from MySQL.

Thank you.
May 19, 2015
VoltDB does not provide support for Hibernate. The main reason is because VoltDB does not support external transaction control. Wherever Hibernate uses multiple SQL statements in a transaction controlled with "commit" or "rollback" commands from the client, typically you would want to replace that with a VoltDB java stored procedure which can be invoked as a single call, and will commit or rollback on the database during execution.

There are other aspects of Hibernate that don't fit well with the capabilities of VoltDB such as generating java classes first and the database schema second, and favoring client-side logic and multiple round trips to the database, rather than having first-class support for stored procedures which have been the gold standard for fast OLTP for a long time.

For migrating data from MySQL, we do provide a tool called "voltify" that can generate a VoltDB-compatible DDL file by connecting to and querying the data dictionary of a running MySQL database. Once a compatible schema is loaded in VoltDB, data can be transferred one table at a time using our JDBC Loader utility. Here are some links that may help:
May 26, 2015
Thanks a lot for your reply. Will give it a try.