Wednesday, 4 September 2013

read-only database + local changes

read-only database + local changes

I have database located on a remote server, every so often I make a dump
that I copy to my local server. During my work I make changes to this
local copy. I would like to keep these changes when I reload the database
from the remote server.
One option I have been thinking of is to have two databases (local_xyz and
remote_xyz) with the same tables. The data from the remote server is
loaded into remote_xyz and is set to be read-only. All updates and new
data is written into local_xyz. Selects are executed on both databases and
a union is done of local_xyz and remote_xyz.
This seems a complex solution and requires me to change all queries to
have the union. I was hoping that there is another way to accomplish this.
Any hints/suggestions?

No comments:

Post a Comment