I think I'd search google for mysql merge database since mythtv is mysql database. I saw some stuff on google when I did this search that may help you out. If not, I guess you could write a script to do it.