Certified Professional in Python Programming (PCPP-32-101) — Question 29
Select the true statements about the sqlite3 module. (Choose two.)
Answer options
- A. The sqlite3 module provides an interface compliant with the DB-API 2.0
- B. The special name memory is used to create a database in RAM
- C. The sqlite3 module does not support transactions.
- D. The fetchall method returns an empty list when no rows are available.
Correct answer: A, D
Explanation
Option A is correct because the sqlite3 module indeed conforms to the DB-API 2.0 standards. Option D is also correct, as fetchall returns an empty list when no rows are found. Options B and C are incorrect since the sqlite3 module supports transactions and can create an in-memory database using the name 'memory'.