MySQL Forums
Forum List  »  Newbie

Dynamically partitioning a table from main to remote mySQL server
Posted by: Juan Valenzuela
Date: March 06, 2016 03:41AM

I have a table in my DB which I need to partitionate based on a foreign key attribute. So the number of partitioned tables is the same as the number of different values present for the foreign key.

Each of partitioned tables have to be stored in remote mySQL databases and their data needs to be "synchronized" with the main DB. These tables need to be created on the remote mySQL dynamically:

For example, the device running the remote DB gets certain identifier number, which corresponds to the foreign key attribute on the main DB's table. So a partitioned table for all records having this identifier number has to be created on the remote DB. If after a while, the device running the remote DB gets a different identifier, a new partitioned table need to be created and so on..

My question is how to do this, (If this is a right approach). Since the data on the remote and main DB's need to be consistent at all times. Im pretty new on this topic. Thanks.

--Im using Java and PHP

Options: ReplyQuote


Subject
Written By
Posted
Dynamically partitioning a table from main to remote mySQL server
March 06, 2016 03:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.