subnet_rx Posted August 29, 2011 Share Posted August 29, 2011 I'm updating my database with a set of data from another database. When there is an item deleted from the source db, how would I make sure it's deleted from the db copy given that I have to run the update in a batch and can't run it when the item is deleted? Would I truncate the db at the beginning of each update, then pull all the of data over? Quote Link to comment https://forums.phpfreaks.com/topic/245983-keeping-two-dbs-in-sync/ Share on other sites More sharing options...
Pikachu2000 Posted August 29, 2011 Share Posted August 29, 2011 Sounds like you're looking for database replication. Quote Link to comment https://forums.phpfreaks.com/topic/245983-keeping-two-dbs-in-sync/#findComment-1263309 Share on other sites More sharing options...
subnet_rx Posted August 30, 2011 Author Share Posted August 30, 2011 Well, not exactly, while the information is in a database, I don't want or need all of it. I'm simply pulling from it as a central source of data. I'm actually putting the data in a RSS feed, then importing into my application. Quote Link to comment https://forums.phpfreaks.com/topic/245983-keeping-two-dbs-in-sync/#findComment-1263589 Share on other sites More sharing options...
cunoodle2 Posted August 30, 2011 Share Posted August 30, 2011 The ONLY reason you should ever have 2 DBs would be for data backups. There should never be a reason to have 2 sets of data. It will just cause issues. Quote Link to comment https://forums.phpfreaks.com/topic/245983-keeping-two-dbs-in-sync/#findComment-1263598 Share on other sites More sharing options...
subnet_rx Posted August 31, 2011 Author Share Posted August 31, 2011 Even if the database is limited to localhost access only, and your site is not on localhost? Quote Link to comment https://forums.phpfreaks.com/topic/245983-keeping-two-dbs-in-sync/#findComment-1263953 Share on other sites More sharing options...
George Botley Posted August 31, 2011 Share Posted August 31, 2011 Hmm, The only reason it would be entirely necessary would be if you were running clusters of servers, like Facebook or eBay, pretty much any larger database driven website where copies are needed for load balancing... One copy is sufficient for most tasks. Just backup your db and store it in another location. Quote Link to comment https://forums.phpfreaks.com/topic/245983-keeping-two-dbs-in-sync/#findComment-1263960 Share on other sites More sharing options...
subnet_rx Posted August 31, 2011 Author Share Posted August 31, 2011 This is not really a backup. I need a subset of information from a larger database. The larger database cannot be accessed remotely. So, I'm basically getting it to put out a xml feed of the subset of information (that is safe to be public) to then pull into my own local db. If there are other solutions given the restrictions, I'm up for other solutions because my current system is not going to perform very well for large datasets. Quote Link to comment https://forums.phpfreaks.com/topic/245983-keeping-two-dbs-in-sync/#findComment-1263999 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.