I am new in master-slave replication and horizontal fragmentation technique. Currently, I am doing my final year degree project title "Cluster replication using horizontal fragmentation approach".
This is my use case:
There are 4 virtual machines. One act as a master server and the others are slave server. I will implement the horizontal fragmentation technique in master server based on campus condition. My database is about student information.
These are the steps for my project:
- Import data from window to Linux
- Configure master-slave
- Implement the horizontal fragmentation techniques.
So, the problem is when I write this coding:
mysqldump --databases Student --tables Student_info --w"Campus in (select Campus from Student_info WHERE CAMPUS='KGB')" --single-transaction >masterdump1.sql
sudo scp masterdump1.sql slave1@192.168.117.143:
The data from the master server fragmented well. But when I try to add new student name, it is not fragment based on the campus condition.
It should be:
SLAVE1: student from KGB
SLAVE2: student from KB
SLAVE3: student from KK
But when updates, it will copy all the data and not fragment like it should be.
Is there any syntax that I left? Any suggestion to solve this problem? can you please help me?