# Online Ddl Modules


![left](./student-guide/diagram/02-Online-DDL-related-modules-01-01.png)
------------------------------------------------------------
TiDB databases support online DDL, that is, DDL operations do not lock tables, and DML statements do not block. Next, let's take a look at the modules required to execute DDL.

First, only one TiDB server is allowed to perform DDL operations for the entire TiDB database at the same time. There is a worker module in every TiDB server. This worker module is responsible for handling DDL operations. It will only be enabled if the current TiDB server role is owner.
        
If you have multiple TiDB Servers in your TiDB database, these TiDB Servers will rotate (by elect) to become the owner role at a fixed time. This time is called the term of office. When a TiDB Server is the owner role and is in the tenure, its worker model The block can handle DDL operations.
        
The current owner role information of the database is persisted in the PD. The woker module can check whether the TiDB server it is in is currently the ownere role. When the owner's term expires, the PD initiates and elects to select a new owner.
        
Secondly, in addition to the worker module, there is also a load schema module, which is used to load the latest schema information after the current TiDB Server becomes the owner role, so that the TiDB Server with the current owner role can be guaranteed to have the latest schema information.
        
Finally, the start job module is responsible for receiving DDL request and assigning IDs to DDL operations. Here, we call each DDL operation assigned an ID job. Start job will persist the job to the queue in TiKV.
        
As for the execution process of DDL statements, we will introduce in detail in “Lesson 05 TiDB Database SQL Execution Process”.