SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do you sync databases without duplication?

    Let's suppose product A is an ecommerce product, and product B is an accounting system. I want pull inventory from A, and put it into B. How can this be done without risk of duplicating data?

    I am not looking for actual code, I just wonder how this is done, in concept. I could think of a few ways that might work, but is there a standard way of doing this?

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,576
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Really, really depends on the underlying database systems--some have some builtin synchronization tools that can be very handy.

    Beyond that, you need to get into specific requirements and come up with a set of synchronization "rules" and then write software that enforces those rules. This will usually take a number of tries to get right.

  3. #3
    <?php while(!sleep()){code();} G.Schuster's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Save a timestamp or unique identifier with each entry so you're able to see if the entry already exists in database B.
    Or take a look at SQLYog - that tool is really great.
    Used it when working for an employer two years ago to restructure a database with a really huge amount of data.
    After entering all changes (e.g. column a from table a should be placed in table X column Y) the program did everything itself without anyone having to look after it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •