Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Database Languages


Database Management System (DBMS) languages are specialized to
interact with and manage databases.

Database Management Systems (DBMS) typically provide several
languages to interact with the database, perform operations, and
manipulate data.

1
Types of Database Languages

Data Definition Language (DDL)

Data Manipulation Language (DML)

Data Control Language (DCL)

Transaction Control Language (TCL)

2
Data Definiton Language (DDL)

DDL is used to define and manage the structure of the database
schema.

It includes commands for creating, modifying, and deleting
database objects such as tables, indexes, views, and schemas.

DDL commands typically have a significant impact on the database
structure and require appropriate permissions.

3
Data Definiton Language (DDL)

Examples of DDL commands include:

CREATE: Used to create new database objects such as tables, views,
indexes, or schemas.

ALTER: Used to modify existing database objects by adding, modifying, or
dropping columns, constraints, or other properties.

DROP: Used to delete or remove database objects such as tables, views,
indexes, or schemas.

4
Data Manipulation Language (DML)

DML is used to manipulate and query data stored in the database.

It includes commands for querying, inserting, updating, and
deleting data within tables.

DML commands focus on the manipulation and retrieval of data and
are commonly used by applications and users to interact with the
database.

5
Data Manipulation Language (DML)

Examples of DML commands include:

SELECT: Used to retrieve data from one or more tables based on specified
criteria.

INSERT: Used to add new rows or records into a table.

UPDATE: Used to modify existing data within a table.

DELETE: Used to remove rows or records from a table.

6
Data Control Language (DCL)

DCL is used to control access to the database and manage
permissions.

It includes commands for granting and revoking privileges on
database objects.

DCL commands are essential for ensuring data security and
controlling access to sensitive information within the database.

7
Data Control Language (DCL)

Examples of DCL commands include:

GRANT: Used to grant specific privileges or permissions to users or roles
on database objects.

REVOKE: Used to revoke previously granted privileges or permissions
from users or roles on database objects.

8
Transaction Control Language (TCL)

TCL is used to manage transactions within the database.

It includes commands for starting, committing, rolling back, and
saving points within transactions.

TCL commands are crucial for maintaining data integrity and
ensuring that transactions are executed reliably and consistently.

9
Transaction Control Language (TCL)

Examples of TCL commands include:

BEGIN TRANSACTION: Used to start a new transaction.

COMMIT: Used to save the changes made during a transaction and make
them permanent.

ROLLBACK: Used to undo the changes made during a transaction and
restore the database to its previous state.

SAVEPOINT: Used to set a savepoint within a transaction, allowing for
partial rollback to that point if needed.

10

You might also like