DBMS Component Languages
DBMS mainly refers to the technology or technique of storing and retrieving user’s data/information with almost efficiency along with appropriate security measures. It’s a collection of inter-related information that helps in efficient retrieval, insertion, and deletion of data from the database and organizes the data in the form of tables, views, schemas, reports, etc. And we also specify rules for the data in a table through SQL Constraints.
Database languages are used to read, update and store data in a database.
Data Definition Language(DDL):
The Data Definition Language is used for specifying the database schema. These languages unit is known as data sub-languages. Here are the lists of tasks that come under DDL:
- CREATE–This command is used to create the database or its objects (like table, index, function, views, store procedure and triggers).
- ALTER –Alter is used to alters the structure of the database
- DROP – Drop command is used to delete objects from the database
- TRUNCATE – Truncate command helps to remove all records from a table, including all spaces allocated for the records are removed
- COMMENT – Comment used to add comments to the data dictionary
- RENAME – Rename used to rename an object
Data Manipulation Language(DML):
A language that gives a set of operations to support the fundamental data manipulation operations on the data held in the database. Data Manipulation Language and this includes most of the SQL statements, and DML is used for both reading and updating the database. DML statements are used to manage data within schema objects. Here are the lists of tasks that come under DML:
- SELECT – It retrieves data from a database
- INSERT – It inserts data into a table
- UPDATE – It updates existing data within a table
- DELETE – It deletes all records from a table, the space for the records remain
- MERGE – UPSERT operation (insert or update)
- CALL – It calls a PL/SQL or Java subprogram
- EXPLAIN PLAN – It explains the access path to data
- LOCK TABLE – It controls concurrency
Data Control Language(DCL):
The Data Control Language (DCL) is used to control privilege in Databases. To perform any operation within the database, such as for creating tables, sequences, or views, we need privileges. Privileges types are:
- System – Creating a session, table, etc. are all types of system privilege.
- Object – Any command or query to work on tables comes under object privilege. DCL is used to define two commands. These are:
- Grant – It gives user access privileges to a database.
- Revoke – It takes back permissions from the user.
Transaction control language:
Transaction Control Language is used to run the changes made by DML statements. It allows statements to be grouped into logical transactions.
- COMMIT – It saves the work done
- SAVEPOINT – It identifies a point in a transaction to which you can later rollback
- ROLLBACK – It restores the database to original since the last COMMIT
- SET TRANSACTION – It changes the transaction options like isolation level and what rollback segment to use.
I hope this post helps you to understand all the Component languages in Database Management System which helps you to run the queries or command.
Keep learning 🙂