Whole database synchronization, while quick and easy, is not an ideal solution for reasons of scalability. A better solution is one that only needs to synchronize the records that change – delta-based synchronization.
At its core, delta-based synchronization is a problem of identifying “what changed” between each execution of a sync process. By identifying what changed the server-side application can then respond to client-side requests by providing only the minimum amount of data necessary to get that individual device updated. An algorithm for this pattern might look like;