Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
GIAC (SANS) logo

GIAC Python Coder

Domain 2Objective 3

Database Interaction GPYC Practice Questions (Page 6)

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 26–30

  1. 26application · medium

    A Python script connects to a remote MySQL server. The connection attempt fails because the server is temporarily unreachable. The script should retry the connection a few times before giving up. Which pattern is most appropriate?

    Select an answer first
  2. 27application · medium

    A Python script transfers funds between two bank accounts in a MySQL database. The script performs a SELECT to check the balance, an UPDATE to debit one account, and an UPDATE to credit the other. If the second UPDATE fails, what must the script do to maintain data integrity?

    Select an answer first
  3. 28foundation · easy

    Which cursor method is used to execute a SQL SELECT statement in Python's DB-API?

    Select an answer first
  4. 29foundation · easy

    Which Python keyword is used to catch an exception so that the program can handle it gracefully?

    Select an answer first
  5. 30application · medium

    A team is building a new Python service that must support both PostgreSQL and SQLite for development and production environments. They want to write the data access layer once and switch databases with minimal code changes. Which tool should they choose?

    Select an answer first
Finished these 5 questions?

Review the revealed explanations, or continue through the curriculum.

No more pagesBack to GPYC

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.