What is the main role of SQL?

SQL or Structured Query Language is basically a programming construct which is domain specific and is used for managing data within relational database management systems (RDBMS). Its often subcategorised into DDL (data definition language) used to define/manage metadata operations, DML (data manipulation language) used for manipulating the data within objects, DCL (data control language) used to control the rights, permissions given for users, TCL (transaction control language) used for managing transactions happening within the system.

Examples of categories are

DDL - CREATE
DML- INSERT
DCL - REVOKE
TCL - COMMIT