# Example

![`smart`](./student-guide/diagram/Example_aa_001_20230718.png)

-------------------------------------------------------------------------------
For easy to explain, let's use a real world example.
Our source database consists of 2 separate `On-Premises MySQL` instances, with some tables being independent and others being sharded across multiple tables and databases.
The target database is a `TiDB Cloud` instance. 
The desired migration relationships are as follows:
The 'information' and 'trace' tables under the 'user' database in instance1 should be migrated to the 'information' and 'trace' tables under the 'user_north' database in `TiDB Cloud`. The 'information' and 'trace' tables under the 'user' database in instance2 should be migrated to the 'information' and 'trace' tables under the 'user_east' database in `TiDB Cloud`.
The 'bj' and 'tj' tables under the 'store' database in instance1 should be migrated to the 'bj' and 'tj' tables under the 'store' database in `TiDB Cloud`. The 'sz' and 'sh' tables under the 'store' database in instance2 should be migrated to the 'bj', 'tj', 'suzhou', and 'sh' tables under the 'store' database in `TiDB Cloud`.
There is a sharded table called 'sales' under the 'salesdb' database in both instance1 and instance2, which needs to be migrated to the 'sales' table in the 'salesdb' database in `TiDB Cloud`. Obviously, we need to perform merging during the migration.