TOPIC 28/2814 MINNOT STARTED

Checking data after an action

After an action, the screen can look right while the stored data is wrong. Compare the two, and hunt for repeats, missing links and moved data that no longer matches.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: posting a letter. After you post a letter you check three things. Was the stamp the right amount? Did the box keep a second copy? Did the letter name a door that exists?

Daily List is a to-do list app. Lily marks a task done, and the screen shows one card. Tom, the tester, asks whether the stored rows match that card.

What it is: A compares the stored rows with the rule the screen claims to follow. A is a second copy of a task that should exist once. An orphan record is a row whose partner is missing, such as a reminder for a task that is not in the table. SQL (Structured Query Language) is the language the check is written in. A table is a grid, a row is one item, and a column is one fact about that item. A total count is easy to mix up with these checks. A count of 3 can look tidy while a duplicate and an orphan are both sitting in the tables.

Why it matters: The screen can hide the second Buy milk. It can also hide a reminder that points at nothing. The harm shows up later, when the reminder fires for a task nobody can open.

A letter is sent once. Data is changed again and again, so the check runs after each kind of action.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Checking that stored data matches the rule after an action.

  1. Is the value right
  2. Is there a second copy
  3. Does the link still lead somewhere
Three questions

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
StampData value
Second copy in the boxDuplicate row
Letter to a gone addressOrphan record
Checking the postData check

WHERE THIS PICTURE STOPS

  • A letter is posted once. Data changes again and again.
  • A post box shows what it holds. A database needs a query.
  • A stamp is right or wrong. A data rule may allow exceptions.

HOOK

Stamp, copy, address.

REMEMBER IT THIS WAY

A contrast: two neighbours told apart by one test.

Duplicate asks: is there a second copy? Orphan asks: has the related record gone?

What each part of the trick stands for
In the trickWhat it stands for
Duplicate rowa second copy of a record that should exist once
Orphan recorda row whose related record has gone

TELL A FRIEND

After posting a letter, check the stamp, the box and the address. After an action, check the value, the repeats and the links.

OFTEN MIXED UP WITH Looking at data with SQL SELECT. The Structured Query Language () lesson shows how to read rows. This lesson says what to look for in them.

PRACTISE AND KEEP

Sources for this topic — 8 sources
  1. Market practice

    Extract, transform, load (ETL) testing: testing in ETL and data-centric projects (EuroSTAR Huddle) ↗ — EuroSTAR Huddle · Checks on moved data include row counts, sums and a row-by-row comparison; counts alone are not enough (search excerpt, page not opened)

    Per the search excerpt, a community article on checking data that is moved from one store to another: counts, sums and a row-by-row comparison. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    How to find duplicate rows in PostgreSQL (Command Prompt education) ↗ — Command Prompt · Group by the columns that should be unique, keep groups with a count above one, and leave the primary key out of the grouping (search excerpt, page not opened)

    Per the search excerpt, a vendor guide: group rows by the columns that should be unique, keep groups with a count above one, and leave out the primary key from the grouping. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    PostgreSQL left join (Hyring learning pages) ↗ — Hyring · A left join with a test for a missing key finds rows that have no match (search excerpt, page not opened)

    Per the search excerpt, a tutorial: a left join with a test for a missing key on the right side finds rows that have no match, such as customers with no orders. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    PostgreSQL foreign key (Devart blog) ↗ — Devart · A foreign key stops rows from pointing at a parent that does not exist (search excerpt, page not opened)

    Per the search excerpt, a vendor tutorial: a foreign key links a column in a child table to the primary key of a parent table so rows cannot point at a parent that does not exist. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    PostgreSQL WHERE (Neon PostgreSQL tutorial) ↗ — Neon · SELECT with a WHERE clause reads only the rows whose condition is true (search excerpt, page not opened)

    Per the search excerpt, a vendor tutorial: select returns rows and the where clause, placed after from, keeps only the rows whose condition is true. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    Combining Queries: UNION, INTERSECT, EXCEPT (PostgreSQL documentation) ↗ — PostgreSQL Global Development Group · Checked on PostgreSQL 16.15: source ids 1,1,2 against target 1,2 gave an empty EXCEPT while the counts were 3 and 2. SQLServerCentral 'Caution with EXCEPT' (search excerpt, page not opened).

    §7.4 UNION/INTERSECT/EXCEPT and ALL. PostgreSQL18 implementation, not a universal SQL mandate. · Checked 2026-11-06

    PostgreSQL18 publisher documentation opened on6November2026: §7.4 UNION/INTERSECT/EXCEPT and ALL. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.

  7. Market practice

    Caution with EXCEPT (SQLServerCentral) ↗ — SQLServerCentral · Checked on PostgreSQL 16.15: source ids 1,1,2 against target 1,2 gave an empty EXCEPT while the counts were 3 and 2. SQLServerCentral 'Caution with EXCEPT' (search excerpt, page not opened).

    EXCEPT returns distinct rows only, so duplicates are hidden. · Checked 2026-10-19

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  8. Implementation-specific

    PostgreSQL documentation ↗ — The PostgreSQL Global Development Group · PostgreSQL 18 official manual, opened 2026-11-06: queries-union, functions-aggregate and transaction-iso. Supports only PostgreSQL behavior; earlier execution evidence remains separately versioned.

    A free, precise, section-numbered description of the SQL a payments practitioner actually writes. Join types and what happens to unmatched rows, GROUP BY and HAVING against WHERE, window functions and the de-duplication and running-total idioms built on them. Transaction isolation levels and the anomalies each permits, index use, and null three-valued logic.

    Used here for the data-and-SQL questions a Payment Operations Analyst, a Production Support Analyst and a Sanctions Screening Analyst are asked. · Checked 2026-08-18

    An implementation, not the standard — which is the point. ISO/IEC 9075-2 is paywalled, and this documents the same constructs in text anybody can open. Its isolation-level chapter attributes to the standard explicitly, so it can carry a standard-level claim as long as the citation says which document it is quoting.

    Cited as market practice rather than an official standard by kind: an engine's manual is authoritative about that engine and is not the obligation. Where a question turns on behaviour PostgreSQL chose rather than behaviour SQL requires, the answer has to say so.

    One correction carried here because it circulates widely: the sentence "The fundamental difference between WHERE and HAVING…", quoted all over the internet as PostgreSQL documentation, is not in the current documentation. It was searched for in the source tree and is not there.

    Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.

    Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.

    Read from the postgres/postgres documentation source tree (doc/src/sgml), which the project itself maintains and which carries the section ids the published URLs are derived from — so a cited section id can be checked against the rendered page.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.