
GIAC Python Coder
Domain 2Objective 3
Database Interaction GPYC Practice Questions (Page 1)
Part of the Scripting and Automation domain, which makes up ~23% of our current practice bank. GIAC (SANS) does not publish an official question count, but from its 120-minute exam (~50–80 total, ~12–18 in this domain), expect 4–6 from this objective — we provide 30 practice questions to prepare you well beyond it. (estimate)
30questions here
6free pages
7concepts
Questions 1–5
- 1
Which Python exception class is the base class for database-related errors in the DB-API 2.0 specification?
Select an answer first - 2
In Python's sqlite3 module, which placeholder symbol is used in a parameterized query?
Select an answer first - 3
A Python application uses SQLAlchemy ORM to query a large table. The application needs to export data to a CSV file, but loading all rows into memory causes out-of-memory errors. The developer must also ensure that the export does not block other database operations for too long. Which approach best addresses both concerns?
Select an answer first - 4
A financial application processes a batch of transactions. Each transaction must be committed individually, but if a transaction fails, the application should retry it up to three times before giving up. The application must also ensure that a failed transaction does not affect previously committed ones. Which approach best meets these requirements?
Select an answer first - 5
A Python service connects to a PostgreSQL database and performs a series of INSERT and UPDATE operations. The service must be resilient to transient network failures, but it must not duplicate transactions if a failure occurs after the database commits but before the client receives the acknowledgment. Which strategy best handles this ambiguity?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by GIAC (SANS). “GPYC” is a trademark of its owner, used for identification only.