Skip to main content

Database languages in DBMS| Explain with syntax - computer science fundamentals tutorial


Relational Database Management System languages and their commands


Database languages play an important role in Relational database management system. Database languages are used to read, update and store data in database. These database languages that can be used for this purpose one of them SQL.
Types of Database languages
There are five types of database language

DDL: -Data Definition Language
DML: -Data Manipulation Language
DCL: -Data Control Language
SQL: -Structure Querying Language
TCL: -Transaction Control Language

         1)DDL(Data Definition Language):- Data Definition Language used for  specifying the data base ‘schema’. It is used for creating tables, schemas etc. in database. Commands of Data Definition Language(DDL) are given below
CREATE: - to create database instances. This commands use to create tables as follows:-
        
CRATE TABLE [name of table] ([definition of column]) [parameter of table]
                           
DROP: - to drop database instances. this command used to delete table or database and syntax is
            DROP type of object name of object

COMMENT: - to comment.

ALTER: -to alter structure of database. this command used to modify properties  of database object. the syntax is
      ALTER  type of object     name of object

2)DML(Data Manipulation Language):-  Data Manipulation Language used for accessing and manipulating data in database. 
 Commands of Data Manipulation Language (DML) are

INSERT: - to insert record(s) into the table.
 UPDATE: - to update data into table.
 DELETE: - to delete record(s) into the table.
SELECT: -to read/retrieved record(s) from table.                                                         

         3)DCL( Data Control Language): -Data Control Language used for granting and revoking user access on a database. 
        Commands of  Data  Control Language(DCL) are given below

   GRANT: - to grant access to user.
  REVOKE: - to revoke access to user.

4)TCL( Transaction Control Language):- Transaction Control Languages are used to changes in the database that we made by using DML commands either performance or role backed by using TCL.  
Commands of Transaction Control Language(TCL) are given below


COMMIT: - to persist the changes made by DML command in database.
ROLL BACK: - to roll back the changes made to the database.


Comments