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)

Learn Intergation from Davneet Sir - Live lectures starting soon!

Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 12 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.