MySQL, I want to Insert, Update, or Delete based on Join result -


i need reconcile 2 systems. 1 on mainframe (master) , 1 on windows server (slave). done on daily basis.

my idea download extract of mainframe system, build database table, join table server's table, issue insert, update, or delete statements based on discrepancies.

it's enrollment table. student can enroll/drop class; earn grade; have professor change grade.

example: master system says kid has following:

math b- biology c+ 

and slave system says:

math economics c 

is there query join 2 tables , issue insert on biology, update on math's grade, , delete on economics?

i know how program digest results of join, wanted know if mysql bit more simply.

using sql across servers not going work you.

if have large database, mysql's replication feature.

if have small database (300mb or less), write shell script that:

  • does mysqldump daily (without gzip compression) on master
  • then rsync's on slave (this gzip it)
  • if rsync configured correctly , overwrites yesterday's *.sql file couple hundred kb of network traffic needed keep 2 300mb sql files in sync
  • finally import sql file slave

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -