DEV Community


Posted on



What is ACID properties :

  • It is a set of database properties. and every transaction must obey this properties for ensuring the integrity and consistency of the database.

  • Atomicity

  • Consistency

  • Isolation

  • Durability

Atomicity :

  • If any update occur in database then it should be reflected in whole database or should not be reflected at all.


  • This property ensure that data remains consistent before and after transaction.


  • This properties ensures that each transaction is occurring independently of the others. This implies that state of an ongoing transaction doesn't affect the state of another ongoing transaction.


  • This property ensures that the data is not lost in cases of a system failure or restart and is present in the same state as it was before the system failure or restart.

Explain the difference between the DELETE and TRUNCATE command in a DBMS.


  • This command is needed to remove the complete data from the table in does not required WHERE clause.

  • It is the command of the DDL.

  1. - It remove complete data from the table in the database.
  2. - It does not maintain the log and delete the whole table at once. hence it's fast.
  3. - It can not be rollback. *Example * : TRUNCATE TABLE TableName;

This command is used when we required to delete a particular data from the table. and this command is used the WHERE clause for deleting the data from the table in the database.
It is the command of the DML

Example :DELETE FROM TableName
WHERE condition;

It is a Data Definition Language Command (DDL). It is used to drop the whole table. With the help of the “DROP” command we can drop (delete) the whole structure in one go i.e. it removes the named elements of the schema. By using this command the existence of the whole table is finished or say lost.

If we want to drop the table:
DROP table

Note – Here we can’t restore the table by using the “ROLLBACK” command because it auto commits.

Discussion (0)