These four categories group SQL commands by what they act on. Data Definition Language (DDL) defines the structure of the database, such as its tables. Data Manipulation Language (DML) reads and changes the rows in those tables. Data Control Language (DCL) grants and revokes access, and Transaction Control Language (TCL) manages transactions.
Group
What it does
Commands
Example
DDL
Defines the database structure
CREATE, ALTER, DROP, TRUNCATE
CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(50));
DML
Manipulates data within tables
SELECT, INSERT, UPDATE, DELETE
INSERT INTO users (id, name) VALUES (1, 'John');
DCL
Controls access to data
GRANT, REVOKE
GRANT SELECT ON users TO user_role;
TCL
Manages transactions
COMMIT, ROLLBACK, SAVEPOINT
COMMIT; or ROLLBACK;
COMMIT makes a transaction's changes permanent and ROLLBACK undoes them. SAVEPOINT marks a point inside the transaction that you can roll back to.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.