Check sibling questions

Which of the following method reflects the changes made in database permanently?

(A) <connection>.done()

(B) <connection>.final

(C) <connection>.reflect()

(D) <connection>.commit()

 

Answer:

 

The commit( ) method in python is used to confirm the changes made by the user to a database.

 

Checking the options

  • (A) <connection>.done( ) - It is not a valid method used to reflect changes made in the database permanently.  
  • (B) <connection>.final( ) -  It is not a valid method used to reflect changes made in the database permanently.    
  • (C) <connection>.reflect( ) -  It is not a valid method used to reflect changes made in the database permanently.    
  • (D) <connection>.commit( ) -  This method used to reflect changes made in the database permanently .  

 

So, the correct answer is (D)

549 people joined Teachoo Black. What are you waiting for?

Davneet Singh's photo - Teacher, Engineer, Marketer

Made by

Davneet Singh

Davneet Singh is a graduate from Indian Institute of Technology, Kanpur. He has been teaching from the past 12 years. He provides courses for Maths and Science at Teachoo.