简体   繁体   English

使用Java,Hibernate进行数据库迁移

[英]database migration using Java , Hibernate

I have three databases in mysql residing in three different servers. 我有三个驻留在三个不同服务器上的mysql中的三个数据库。 I want to combine the data from the three servers and consolidate as a single database. 我想合并来自三台服务器的数据并整合为一个数据库。 Is it possible to dos o in Hibernate? 在Hibernate中可以执行dos o吗?

您应该使用在Toad社区版本中可以找到的任何实用程序的导入/导出向导

You could read 1/multiple records of data at a time from 2 of the databases and check whether the records exists in the third database. 您可以一次从2个数据库中读取1 /条数据记录,并检查第三个数据库中是否存在记录。 If not, then write. 如果没有,那就写。

Depending on your memory constraints, you could try keeping a master data table in memory as a collection, adding to it from all 3 databases and the writing it once the table is done 根据您的内存限制,您可以尝试将主数据表作为一个集合保存在内存中,从所有3个数据库中添加该主数据表,并在完成表后将其写入

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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