21. How do you execute a stored procedure from Python using the sqlite3 module? A. Using the execute() method B. Using the call() function C. Using the run() method D. Using the exec_procedure() function Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A Solution: You can execute a stored procedure using the execute() method from the sqlite3 module.
22. What is the purpose of database transactions? A. To improve database performance B. To create new databases C. To manage data integrity and consistency D. To encrypt database files Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: Database transactions ensure data integrity, consistency, and the ACID properties (Atomicity, Consistency, Isolation, Durability).
23. Which of the following is NOT an isolation level for database transactions? A. READ UNCOMMITTED B. READ COMMITTED C. REPEATABLE READ D. DATA UNCHANGED Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D Solution: "DATA UNCHANGED" is not an isolation level; the correct option is typically "SERIALIZABLE".
24. How can you rollback a transaction in the sqlite3 module? A. Using the commit() method B. Using the rollback() method C. By closing the connection D. By re-executing the transaction Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B Solution: The rollback() method is used to undo changes made during a transaction in the sqlite3 module.
25. What is the purpose of database normalization? A. To reduce database size B. To increase database speed C. To organize data and eliminate redundancy D. To enforce strict typing Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C Solution: Database normalization organizes data to eliminate redundancy, improve data integrity, and minimize anomalies.