Computer Science
Assertion. A database connection object controls the connection to a database.
Reason. A connection object represents a unique session with a database, connected from within a script/program.
Python MySQL
1 Like
Answer
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
A database connection object controls the connection to the database, ensuring that the script or program can communicate effectively with the database. This connection object represents a unique session with a database connected from within a script/program.
Answered By
2 Likes
Related Questions
The cursor.rowcount returns how many rows have been so far retrieved through fetch..() methods from the cursor.
A DELETE or UPDATE or INSERT query requires commit() to reflect the changes in the database.
Assertion. A database cursor receives all the records retrieved as per the query.
Reason. A resultset refers to the records in the database cursor and allows processing of individual records in it.
Assertion. The database cursor and resultset have the same data yet they are different.
Reason. The database cursor is a control structure and the resultset is a logical set of records.