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)