BCA / B.Tech 13 min read

Database Languages

Database Languages in DBMS:

Database languages are used to read, store, and update data in a database. There are four main types:
  • Data Definition Language (DDL): Used to define the database structure or schema.
    • Commands: `CREATE`, `ALTER`, `DROP`, `TRUNCATE`.
    • Purpose: To create and modify the structure of database objects like tables.
  • Data Manipulation Language (DML): Used for managing data within schema objects.
    • Commands: `SELECT`, `INSERT`, `UPDATE`, `DELETE`.
    • Purpose: To retrieve, add, modify, and delete data from tables.
  • Data Control Language (DCL): Used to control access to data in the database.
    • Commands: `GRANT`, `REVOKE`.
    • Purpose: To give or take away permissions for users.
  • Transaction Control Language (TCL): Used to manage transactions in the database.
    • Commands: `COMMIT`, `ROLLBACK`, `SAVEPOINT`.
    • Purpose: To manage changes made by DML commands.