Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Updating local DB from web

 
Brett Williams
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this more effecient than just pulling out specific portions of the database that I need?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic