A Database Management System has all the required interfaces and languages for the purpose of expressing the updates and queries in the database. These database languages can be used for reasons like storing, reading, and updating the data in the database.
There are a number of database languages which can be used. These include:
1. Data Definition Language
- DDL is an acronym for Data Definition Language. This language is used for defining pattern or database structure.
- The creation of schema, indexes, tables, etc. are made using Data Definition Language.
- DDL is crucial in creating the basic framework of the database.
- The information of metadata is stored using the Data Definition Language. This metadata includes numbers of the schemas and tables, indexes, relations, among other things.
The tasks that come under Data Definition Language are:
- Create: This task is used for the creation of objects in DBMS.
- Alter: The database structure is altered using this task.
- Drop: The data is deleted from the database using this task.
- Truncate: All records are deleted from the database using this command.
- Comment: Comments on the data dictionary are made using this command.
All of the above commands are used for the purpose of defining the database, which is why the language is named as Data Definition Language.
2. Data Manipulation Language
Data Manipulation Language can be shortened to DML. It accesses and manipulates the data in a database. It also handles the user request. Some tasks which come under the Data Manipulation Language are:
- Select: Data retraction is done using this command.
- Insert: This command is used for adding information to the table.
- Merge: This command is used for updating or inserting operations.
- Explain plan: This is used for the parameter which explains the data.
- Lock Table: This command controls the concurrency of the table.
- Call: A java subprogram or a structured query can be called using this language.
3. Data Control Language
- Data Control Language is also called DCL in short. It is used for the retrieval of stored data in the database.
- Since the Data Control Language is transactional, it has parameters for rollback.
Tasks performed by DCL are:
- Grant: This command is used for providing access to the database to privileged users.
- Revoke: This command is used for the revoking of access to users.
The operations which have the ability to revoke are:
4. Transaction Control Language
The changes made by the Data Manipulation Language are run by the Transactional Control Language. Transaction Control Language can be grouped together in a logical transaction.
Tasks which come under Transaction Control Language are:
- Commit: This task is used for saving a particular transaction in the database.
- Rollback: This task is used to restore all the data since the previous transaction.