2. Transaction Control Language (TCL) :
TCL deals with the transactions within the database.
Difference between DML and TCL :
|1.||Full Form||DML stands for Data Manipulation Language.||TCL stands for Transaction Control Language.|
|2.||Definition||DML stands for Data Manipulation Language and is used to manipulate data in the database by performing insertion, updating and deletion operations.||Transaction Control Language (TCL) consists of commands that deal with the transactions within databases.||3.||Classification||Data Modification Language is further classified into Procedural and Non-Procedural DML.||Transaction Control Language doesn’t have any further classifications.|
|4.||DBMS feature exhibited||It exhibits the feature of easy maintenance (of files).||It exhibits the feature of Atomicity.|
|5.||Use in Transactions||DML cannot be used for database transactions.||TCL is used for handling database transactions.|
|6.||Order||DML statements are usually written before TCL statements in a Query.||TCL statements are usually written after DML statements in a Query.|
|7.||Use of Log files||It does not use Log files.||It uses log files to keep a record of all transactions.|
|8.||Commands||Frequently used commands present in DML are: UPDATE, INSERT, MERGE, SELECT, DELETE, CALL, EXPLAIN PLAN, LOCK TABLE.||Frequently used commands present in TCL are: COMMIT, ROLLBACK, SAVEPOINT, SET TRNSACTION.|
|9.||Handled by||DML is handled by the Query Compiler and Query Optimizer part of the DBMS architecture.||TCL is handled by the Transaction Manager and Recovery Manager.|
|10.||Locking||It uses Locks for concurrency control.||It does not use Locks.|
|11.||WHERE clause||Most DML statements have WHERE clause to filter them.||TCL does not need WHERE clause.|
|12.||Data Access Paths||DML can be used to explain access paths to data.||TCL cannot explain data access paths.|
|13.||Call a subprogram||It is used to call PL/SQL or Java subprogram.||It is not used to call subprograms.|
|14.||Merge operation||We can perform Merge operation using DML.||TCL cannot perform Merge operations.|
|15.||Trigger||Triggers are fired after DML statements.||TCL is not used for triggers.||16.||Example||Example of SQL query that finds the names of all instructors in the History department :
WHERE dept_name = ‘History’;
|We will use commit command to save the table record permanently. Incase we want to update the name Jolly to sherlock and save it permanently, we would use the following,
SET NAME = ‘Sherlock’
WHERE NAME = ‘Jolly’;
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- SQL | DDL, DQL, DML, DCL and TCL Commands
- SQL | DDL, DML, TCL and DCL
- Difference between DDL and DML in DBMS
- Difference between DDL and TCL
- DML Full Form
- TCL Full Form
- Difference and Similarities between PHP and C
- Difference between Stop and Wait protocol and Sliding Window protocol
- Similarities and Difference between Java and C++
- Difference between Yaacomo and and XAP
- Difference between VoIP and and POTS
- Difference between ++*p, *p++ and *++p
- Difference Between DOS and Windows
- Difference between User Level thread and Kernel Level thread
- What’s difference between The Internet and The Web ?
- Difference between Priority Inversion and Priority Inheritance
- What’s difference between Linux and Android ?
- What’s difference between header files "stdio.h" and "stdlib.h" ?
- Difference between HTML and HTTP
- Difference between http:// and https://
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.