I’m a student and I would like to replicate in real time the entries in Table A and Table B.
table A (article_id, article_content) in database A
table B (id, article) in database B
I want them to have the same entries all the time.
If there is a new entry in table A, I want it to be added into table B in real time (with low latency) but I cannot do it straight away because the fields aren’t the same.
So I thought about replicating both tables in each database
table A in database A replicated in table AB in database B
table B in database B replicated in table AB in database A
and then add some triggers to table AB to modify correctly table A and table B.
Is it a good solution ? thanks
I’d suggest a master db to write to and then set up slaves to clone master. Otherwise you will have a hell of a time managing keys/foreign keys.