File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes How to clone records of one table to another table in runtime? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to clone records of one table to another table in runtime?" Watch "How to clone records of one table to another table in runtime?" New topic
Author

How to clone records of one table to another table in runtime?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
Hi
thank you for reading my post,
I have one database which is a part of another application which my application should work in relation to it.
a problem that i have is something like this:
DB1 which is the old (already working ) application database has some tables which my application need thier data.
but DB1 tables are always under changes, ( records are comming , updating, and going out of the table)
How can my application understand when a record is changed in old tables in order to react to those changes?

Thanks
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

If both databases are on the same server, you could just use a trigger to keep them up to date.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 550
Hi
they are not in the same server and they are not the same databases .

Thanks
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

So you are looking at some sort of database synchronization or replication tool. These sorts of things tend to be heavy-weight and expensive. Have a google for "database synchronization" to see what's out there.

How do you use the data in DB 1 and what database is it? Do you only need to read from tables? If so some databases allow you to create tables views that are actually tables in another schema, which might avoid the need to use any sort of synchronization.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to clone records of one table to another table in runtime?
 
Similar Threads
Tomcat with more than one Applications in WEBAPPS folder
JDBC-ODBC(VERY VERY URGENT PLEASE)
Hibernate on DB's w/o Primary Keys
export/import
Merge statement for merging data of tables from two different databases