Section 4 Solutions
These are the answers to the Section 4 Review's Knowledge Check. If you haven't attempted the five scenarios yet, do that first.
Scenario 1: One Query Per Loan Document
Correct answer: Database Performance Testing's N+1 pattern — check the actual query count at different document-list sizes.
Explanation: 25 documents producing roughly 25+ queries instead of one combined query is the textbook N+1 shape this module named directly — the fix is almost always a single JOIN-based query replacing the per-row fetches.
Alternative approaches considered: Assuming the page is "just slow" and needs general optimization would miss the specific, fixable pattern — the query-count comparison at different list sizes is what actually identifies N+1 specifically.
Real-world reasoning: A near-restatement of the module's own AtlasBank beneficiary-statement example, testing whether the pattern transfers to a different but structurally identical feature.
Scenario 2: Read-Only Reporting Tool With Write Access
Correct answer: Database Security Testing's least-privilege check — query the credential's actual granted privileges and compare against its documented, read-only need.
Explanation: A reporting tool that's supposed to be read-only having any write access at all is exactly the kind of gap this module's privilege-comparison check is designed to catch — invisible to functional testing, since the tool never exercises the unnecessary write access during normal use.
Alternative approaches considered: Testing the tool's own UI/functionality wouldn't reveal this — the gap only shows up by querying privilege metadata directly, independent of what the application currently does with that access.
Real-world reasoning: Applies the module's core technique to a variant scenario (unnecessary write access rather than unnecessary table access), testing whether the underlying principle, not just the specific example, was understood.
Scenario 3: Legitimate Name Triggers a Database Error
Correct answer: Database Security Testing's SQL injection symptom recognition — report the specific input and error as a security defect, without attempting further exploitation.
Explanation: This is the module's own O'Connor example restated with a different name — a syntactically ordinary value containing an apostrophe producing a database error is a clear, reportable injection symptom, indicating user input is reaching the query unsafely.
Alternative approaches considered: Dismissing this as "an edge case with unusual names" would miss that this is a real, common, and serious defect class — the input is entirely realistic, not adversarial, which is exactly what makes it an effective and important test case.
Real-world reasoning: A close variant of the module's own worked example, testing whether the "test with legitimate special-character input" technique was understood as generally applicable, not tied to one specific name.
Scenario 4: Backup Job — Six Months of Green Checkmarks
Correct answer: Backup, Recovery, and Audit Validation's restore-testing principle — a consistent success status is not evidence of restorability; only an actual restore, verified directly, is.
Explanation: This is the module's central lesson, restated as a scenario — six months (or a year, as in the module's own opening example) of consistent "success" notifications provides no more genuine evidence than a single one, since the job's own status report was never actually testing restorability in the first place.
Alternative approaches considered: Treating a long, consistent success streak as increasingly reassuring evidence is exactly the false confidence this module explicitly warns against.
Real-world reasoning: Tests whether "success status ≠ restorability" was understood as an absolute distinction, not a matter of degree that a longer streak could offset.
Scenario 5: Feature Loads Instantly on Small Test Accounts
Correct answer: Database Performance Testing's realistic-data-volume principle — this hasn't actually been performance-tested yet; seed a realistically large test account and compare.
Explanation: This is the module's own opening scenario in miniature — fast performance against small test data provides no evidence about performance at realistic scale, since this entire defect class specifically hides at small data volumes.
Alternative approaches considered: Concluding the feature is "fast" based on current test results would repeat the exact mistake the module's transaction-history example made.
Real-world reasoning: Directly tests whether "small test data hides this defect class" was understood as a general rule to apply proactively, not just a lesson tied to one specific example.
Section 4 Complete
Across three modules, this section extended database testing into realistic-scale performance awareness, QA-scoped security verification, and backup/recovery/audit validation — closing this path's instruction-module content. From here, continue to Section 5 — Application Modules & Capstone, where this entire path's toolkit is applied together against full, realistic scenarios across two domains, closing with a capstone that traces the same AtlasBank compliance defect three other learning paths have already independently found — this time from the one layer only direct database validation can reach.