Current location: Hot Scripts Forums » Other Discussions » Database » how to make offline database consistent


how to make offline database consistent

Reply
  #1 (permalink)  
Old 07-22-10, 09:43 AM
bubuna bubuna is offline
New Member
 
Join Date: May 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
how to make offline database consistent

hi all,

I'm not sure whether should i post my question here.
I'm doing a program that have 2 modes, which are live database and offline database. Live database is from server and offline database is in local database(as a back up-when server down, it still can work without interrupt). i got 3 PCs and 1 server, so if there are 2 pc's connection encounter problem and need to run offline database, then how am i going to make sure the data is consistent after the connection is okay?
for example, if i have a table with an auto increment column as the primary key, and what if the 2 of PCs need to run in offline database, and after connection is up then how can i get a consistent data(as currently after the connection is up, then the 2 offline databases restore the data back to live database then they may have duplicated data happened).
Anyone can help on this? or any suggestion?
Reply With Quote
  #2 (permalink)  
Old 12-07-10, 11:56 AM
Icepick.pt's Avatar
Icepick.pt Icepick.pt is offline
Newbie Coder
 
Join Date: Nov 2010
Location: Setúbal, near Lisbon
Posts: 89
Thanks: 3
Thanked 7 Times in 7 Posts
Your backup servers must be replications of the main one.

Basically, you need to set up a replication configuration, in wich your two slave servers are updating every change that occurs on the master. Obviously, replication assumes that the slaves do not make any database change outside the replication schema.

The replication is conducted through both the master and the slaves logs.
This means that you can cut comunication between master and slaves at any time. When connection is available again, the slaves will catch up from the master logs from the point they have stopped.

Replication is fairly easy on MySQL but you may want to have a professional doing this, depending on how precious the consistency of your data is.
__________________
You can allways find me at www.datagen.eu

Last edited by Icepick.pt; 12-07-10 at 12:06 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editable Database Aell PHP 3 07-22-10 10:44 AM
Best way to make searchable database Barnz1986 PHP 7 11-30-06 11:20 AM
Share database over the Internet nitinkedia New Members & Introductions 1 07-10-03 02:50 PM


All times are GMT -5. The time now is 05:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.