Actual local SQLite fixture results
ViewResult rowsDistinct accounts representedUnique owner matches
Exact-key inner join54 of 6Not the metric reported
Trimmed-key inner join65 of 6Not the metric reported
Account-preserving review66 of 64 of 6; 1 ambiguous, 1 unmatched

Six result rows came back from a join over six accounts. That sounds like complete coverage until you count the account identifiers: only five accounts appear. In this new independent experiment, a duplicate owner record adds an extra row while an unmatched account disappears. The equal totals cancel numerically and hide two different review problems.

This is a synthetic IAM reconciliation study, created for portfolio review rather than a commissioned article. I ran the fixture using Python 3.12.14 and SQLite 3.53.1. It contains six account records and six fictional person-source records. No directory, HR system or production database is connected.

Define the question before the join

The question is whether each account can be linked to exactly one person-source record under an agreed matching rule. It is not whether every enabled account should remain enabled. A person match and an access decision require different evidence.

The account list is the review population. Each account has its own account_id, owner_id and enabled flag. The person source has a source-row reference, person_id and active or inactive status. The fixture deliberately repeats E-009 and includes a person identifier with surrounding spaces. Identifiers 0012 and 12 represent different people in this invented contract.

Measure what the raw join returns

An inner join using exact identifier equality returns five rows representing four distinct accounts. The account owned by E-007 misses its person record because that source value has surrounding spaces. The account owned by EXT-1 also has no match. The account owned by E-009 appears twice because the person source contains two matching rows.

SQLite’s SELECT documentation explains how join input and matching conditions determine the resulting rows. A matching pair is a result row; the database does not know that an account should have only one authoritative owner. That constraint belongs in the data contract and its checks.

Change one policy and count again

For the second run, I allowed removal of ordinary leading and trailing spaces on both join keys. This is an explicit fixture policy. It is not a universal normalization rule for identity systems. Original strings remain available, and leading zeros remain meaningful.

Illustrative data comparison and review workspace
Reused AI-generated editorial concept from BrandItAI’s portfolio. Illustrative; no real client, directory or deployment is depicted.

The trimmed join returns six rows representing five distinct accounts. E-007 now matches. E-009 still appears twice, and EXT-1 remains absent. Dividing six join rows by six input accounts produces 100 percent, but that number does not measure account coverage.

Even counting five distinct accounts is incomplete for the stated question. One of those accounts has two person-source matches. Distinct counts can remove repeated account values from an aggregate; they do not prove that each account has an unambiguous owner. SQLite documents those counting semantics separately from the meaning of a business entity.

Preserve every account and classify the match

The third view starts with all six accounts and retains unmatched records. It groups matches per account and classifies the match count: zero is unmatched, one is unique, and more than one is ambiguous. The result contains four unique matches, one ambiguous account and one unmatched account.

This produces a reviewable 66.7 percent unambiguous-match figure for this fixture. It is a measurement of our narrow reconciliation contract, not an access-control score or a customer result. The ambiguous account stays held even though its two person records both say active. Agreement on one attribute does not establish which source row is authoritative.

Apply status rules only after identity resolution

For accounts with one owner match, the example separately checks whether an enabled account is linked to an inactive person. A-02 becomes a review candidate. A-04 has an inactive owner but is already disabled, so it does not trigger this selected rule.

A-05 remains ambiguous and A-06 remains unmatched. Neither is automatically disabled. An unmatched record might be a service account, an external identity, a missing export or another case requiring context. This fixture provides no authority to decide that question or change access.

Keep the experiment inspectable

Illustrative documentation evidence review
Reused AI-generated editorial concept from BrandItAI’s portfolio. Illustrative; no real client, directory or deployment is depicted.

The paired walkthrough switches between exact joins, trimmed joins and the account-preserving review. It shows original identifiers, matched source references and explicit holds. Downloadable synthetic inputs and the result summary let a reader reconstruct the small experiment. The local Python/SQLite check passed 23 assertions, including preservation of leading zeros and the missing-account case.

The result is specific: equal join-row and input-row totals can coexist with an unmatched account when another account has multiple matches. It is a reproducible counterexample in a tiny dataset, rather than a claim about prevalence in real organizations. A useful technical article can start there: show what happened, explain why, and make the next review decision visible.

BrandItAI can discuss a scoped data or documentation assignment using approved source material and agreed acceptance checks. This new AI-assisted sample states its test environment and limits; it does not represent a client deployment.

Inspect the experiment

Interactive result trace · Fictional people source (CSV) · Synthetic accounts (CSV) · Checked result summary (JSON)

No private source code, credentials, real identity data or employer material is included. This sample does not establish prior DevTools commissions. Discuss a scoped technical assignment.