All Products
Search
Document Center

:Overview

Last Updated:May 30, 2025

The FEDERATED storage engine allows you to remotely access data in PolarDB for MySQL clusters or in MySQL Community Edition databases without using replication or clustering technologies. No data is stored in the local FEDERATED table. If you query the local FEDERATED table, data is extracted from the remote table. When you create a table by using the storage engine of PolarDB for MySQL or MySQL Community Edition, the table consists of a table definition and relevant data. When you create a FEDERATED table, it uses the same table definition as a common table, but the physical storage of data is implemented on the remote server.

A FEDERATED table consists of two elements:

  • A remote PolarDB for MySQL cluster or MySQL Community Edition server that contains a table, which consists of a table definition (stored in the MySQL data dictionary) and is associated with a local table. The remote table can be of any type supported by the remote server, such as MyISAM, InnoDB, and CSV.

  • A local cluster that contains a table, which uses the same table definition as the remote table. The table definition is stored in the MySQL data dictionary. The local cluster contains no data files. The table definition contains a connection string that points to the remote table.

When an SQL statement is executed on a FEDERATED table in a PolarDB for MySQL cluster, data files are inserted from the local PolarDB for MySQL cluster. The operations to update or delete data files are sent to and performed on the remote PolarDB for MySQL cluster or MySQL Community Edition server, which then sends updated data files or returned rows back to the FEDERATED table.