2 Answers - Sort by: Date | Rating
There are various types of sql queries being used for different types of database functions. Commit is used for saving the data that has been changed permanently because whenever you perform any DML (Data Manipulation Language) like UPDATE, INSERT OR DELETE then you are required to write Commit at the end of all or every DML operation in order to save it permanently. If you do not write Commit and you program crashes then your data will be restored into its previous condition. Another key point relating to commit and DML operations is that whenever you perform DML function and then perform some DDL ( data definition language) like creating a table then the data is auto committed - no need to write explicit Commit.
Whereas if you want to restore your data into its previous condition then you can write Rollback at any time after the DML queries has been written but remember once Commit has been written then you cannot rollback the data. Moreover you can only rollback the DML queries that have been written after the last commit statement. The concept of commit and rollback is designed for data consistency because many uses manipulate data of the same table, using the same database so the user must get updated data. That is why Commit and Rollback are used.
Whereas if you want to restore your data into its previous condition then you can write Rollback at any time after the DML queries has been written but remember once Commit has been written then you cannot rollback the data. Moreover you can only rollback the DML queries that have been written after the last commit statement. The concept of commit and rollback is designed for data consistency because many uses manipulate data of the same table, using the same database so the user must get updated data. That is why Commit and Rollback are used.
1
0
Commit is to save whatever has been done. It is used to permanently store it in memory.
Roll-back is to undo something. If we use roll-back, the particular changes made are undone.
Roll-back is to undo something. If we use roll-back, the particular changes made are undone.
0
0
- How Do I Add A Column To A Table In Word 97?
- What Is A Disadvantage Of Using A Paper-based Database?
- What Is Code Of Integrity?
- How The Efficiency And Integrity Of The Data Is Maintained At All?
- What Is File-based Approach?
- How Do I Create An SQL Queries That Show: Student Name, Address, And Contact Information For All Students? Student Name And The Certificate Program For Which They Are Registered Student Name And The Courses For Which They Are Registered?
- I Need To Create A System Where Students Can Register For One Of 5 Certificates, Select Courses, And Obtain A Transcript Of The Grades Received For The Courses. Each Student Can Be Enrolled For Only One Certificate. There Are 4 Courses In Each Cert?
- How The Efficiency And Integrity Of The Data Is Maintained At All Times Although The Database Is Used By Varying Organisational Levels? 2 Examples
- What Is Indexed File Organization?
- How The Performance Of Database?
- How Is That The Additional Hardware Affect The Data Base Management System?
- How Do You Automate Starting And Shutting Down Of Databases In Unix?
- What Is Centralize Database Management System?
- What Is Hierarchy Or Structure Of Database?
- Explain How Records And Related Records Are Deleted To Ensure The Integrity?
- What Is The Definition Of Hierarchical?
- What Is Rule Based Query?
- Network Data Model And How Its Structure Contributed To Database Environment Development?
- What Is Relationship In Terms Of Dbms?
- Which Of The Following Statements About Referential Integrity?
- Will The Little Ma Mind Get The Ind Entity?
- Describe Hierarchical Database And It's Example?
- What Are The Advantagem Of Database Management Approach To Organizing?
- Why Does Integrating Flat File Data In A Database Improve Data Integrity?
- What Is Sequential?

New Comment - Comments are editable for 5 min.