aspose file tools*
The moose likes JDBC and the fly likes Updating local DB from web Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Updating local DB from web" Watch "Updating local DB from web" New topic
Author

Updating local DB from web

Brett Williams
Greenhorn

Joined: Aug 23, 2005
Posts: 19
I have a website that includes a database that is made up of all the members and pertinent information for my organization. It gets updated throughout the day based upon people registering their dogs and clubs with our organization.

I am developing a offline application that is dependant on this information. I need to be able to pull the information from the website database and populate a local running MySQL database. (If it matters the website is running MySQL as well)

I envisioned running a SELECT for all the information that I need, doing a DROP and the current tables, and then INPUT all of the information from SELECT to the local database. My concern is that there will be a LOT of records to deal with. Something in the neighborhood of 2,000 records to start, and as time goes on it could get into the 10's of thousands of records.

Is there a more efficient way to go about doing this type of an operation?


Brett M. Williams<br />Co-Founder - United Flyball League International<br />Website Administrator<br />Software Developer<br />Database Admin<br />Anything else "techie"
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Have you looked into database replication? It is supported by MySQL.
See http://dev.mysql.com/doc/mysql/en/replication-howto.html
Brett Williams
Greenhorn

Joined: Aug 23, 2005
Posts: 19
Is this more effecient than just pulling out specific portions of the database that I need?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30772
    
156

Originally posted by Brett Williams:
Is this more effecient than just pulling out specific portions of the database that I need?

Yes. You can usually configure the replicator to only copy certain tables or schemas. And the replicator is built to do this, so it does a faster job of it.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Updating local DB from web