// Metadata created by nebel
//
:databaseHistory:
[id="how-the-mysql-connector-uses-database-schemas_{context}"]
= How the MySQL connector uses database schemas

When a database client queries a database, it uses the database's current schema. As database schemas often change, the {prodname} *MySQL connector* knows how the schema appeared for each `INSERT`, `UPDATE`, and `DELETE` operation.

MySQL includes both _row-level changes_ and _DDL statements_ in its binlog which the connector reads to parse and update the in-memory representation of each table's schema. This is used to understand the table structure at the time of each operation, which produces accurate change events.

NOTE: The connector records all DDL statements along with their position in the binlog in a separate database history so that when the connector restarts (_after a possible crash or graceful shutdown_), it continues reading the binlog from that specific point in time.

TIP: See xref:the-mysql-connector-and-kafka-topics_{context}[The MySQL connector and Kafka topics] for more on topic naming conventions.

.Additional resources

* If you do not use the _database history topic_ described here, check out the xref:how-the-mysql-connector-handles-schema-change-topics_{context}[schema change topics].
