DEV Community

Axel Blaze
Axel Blaze

Posted on

Types of Data Languages

A database is a collection of connected data that provides effective information retrieval, insertion, and deletion. The data is organised in the database using tables, views, schemas, reports, etc. For instance, a university database organizes information about students, faculty, administrative staff, etc., enabling effective data retrieval, insertion, and deletion.

A database management system is a computer function that stores, retrieves, and processes data. The software is designed to provide independent access to physical and logical data and can protect the data from tampering. The DBMS includes an application programming interface that allows programmers to modify data easily. A DBMS can support complex relationships between data and can provide a centralized and secure store of data.

There are four types of Data Languages in DBMS

  1. Data Definition Language (DDL)
  2. Data Manipulation Language(DML)
  3. Data Control Language(DCL)
  4. Transactional Control Language(TCL)

Data Definition Language (DDL)

Data Definition Language, or DDL for short, deals with database schemas and specifications of how the data should be stored in databases.

Create a database and its objects, such as (table, index, views, store procedure, function, and triggers)

ALTER: Modifies the existing database's structure

DROP: Remove database objects

TRUNCATE: Remove every record from a table, together with the spaces set aside for the records.

COMMENT: Include your thoughts in the data dictionary.

RENAME: Rename an Object.

Data Manipulation Language(DML)

DML is the short name for Data Manipulation Language which deals with data manipulation and includes most common SQL statements such SELECT, INSERT, UPDATE, DELETE, etc., and it is used to store, modify, retrieve, delete and update data in a database.

SELECT: Retrieve data from a database
INSERT: Insert data into a table
UPDATE: Updates existing data within a table
DELETE: Delete all records from a database table
MERGE: UPSERT operation (insert or update)
CALL: Call a PL/SQL or Java subprogram
EXPLAIN PLAN: Interpretation of the data access path
LOCK TABLE: Concurrency Control

Data Control Language(DCL)

Data Control Language, commonly known as DCL, serves as a database access specifier. (essentially to provide and take away access from database users)

GRANT: Give the user access to do DML (SELECT, INSERT, DELETE,...) operations on the table.

REVOKE: revoke the user's ability to use the DML (SELECT, INSERT, DELETE,...) command on the designated table.

Transactional Control Language(TCL)

The term TCL stands for Transactional Control Language, which serves as a manager for all transactions and sorts of transactional data. Several of TCL's commands include

Role Back: A method for undoing or cancelling database changes

Commit: This is how you apply or save database changes.

Save Point: This is where data is temporarily saved in a database.

READ MORE : Brainalyst.in

Top comments (0)