hop of those help? You should stick with one database and one database only unless you have specific reasons to violate that rule. Examples of valid reasons include: You've got a multi-tenant application and the instances of this application do not share data, so you spread them out across multiple databases to eliminate a single point of failure. Even then, these instances are just clones of the same basic schema. You need to shard your data across multiple instances for performance reasons or because of storage constraints that can't be solved in a cost-effective manner any other way. These shards share a schema, but only a portion of the complete data set. You need to create a replica or derivative set of data for data-warehouse and/or reporting reasons. These instances may have a radically different schema because they're optimized around read activities, not writes.
may help you . You can do it with a combination of UPDATE and SELECT query. However since TABLE 1 has the column title which is of type VARCHAR(255) and TABLE 2 has the column Name which is of type VARCHAR(100) might give a problem. The following query can do this migration however any row with column title having length more than 100 will be SHORTENED to 100.
INSERT INTO T2
(ID, Name, UserID)
SELECT id, SUBSTR(title, 0, 100), uid
Spring Framework connect to multiple data bases xml JAVA
help you fix your problem I am trying to connect to two data bases in using my db config file. If i define second bean for data source i have an exception for a not writable property. Which is the correct way to define two data sources ? And do i need to do something in my java classes ? , I find the solution of my problem.