Software Testing / Learning brief

Tom tries to break four database rules

What this means in plain language

Tom tests four rules on a copy of the tasks table and finds a raw error that the screen should hide.

Understand the full idea, step by step

Analogy: a locked gate with rules. A gate lets people in only if they have a ticket, a name and a valid date. Even if the front desk forgets, the gate still checks.

The gate protects the place whatever happens at the desk.

A constraint is a gate inside the database. Tom, the tester at Daily List, a to-do list app, tests the gate as well as the desk.

PLAIN WORDS · 1 in this section
constraint
a limit or rule that restricts what can be done

Evidence & review

REVIEWED 2026-10-31

The date on this lesson is when it went up on Payments Signal, not when its material was written — most of these were brought across from an earlier catalogue in a single run, which is why so many of them share a date. What the lesson says about the world is dated by the review above and by the sources below it.

A made-up Daily List database used to teach SQL (Structured Query Language) checks. The people, the app and the data are invented.

What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Sources were seen only as search excerpts. Tools and screens change, and each team sets its own.

Sources for this brief — 3 sources
  1. Market practice

    PostgreSQL documentation: 5.5 Constraints ↗ — PostgreSQL Global Development Group · PostgreSQL documentation: constraints include check, not-null, unique, primary key and foreign key constraints, and by default two null values are not considered equal in a unique constraint (search excerpt, page not opened)

    By default two null values are not considered equal in a unique constraint; NULLS NOT DISTINCT changes this (added in PostgreSQL 15). · Checked 2026-10-18

    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.

  2. Market practice

    PostgreSQL foreign key (Devart blog) ↗ — Devart · Devart blog: a foreign key links a column to a key in another table, so a row cannot point to something 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.

  3. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal

    This site's own simplified teaching models. · Checked 2026-07-12

    Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.

Learn this properly

START HEREDatabase constraints: rules the data must obeyA constraint is a rule the database enforces, such as not empty, unique or linked. Learn to test the rule at the database as well as in the app.Opens at L0 Explain simply · about 15 min

Related briefs

Tom checks which security rules apply

Tom separates regulatory and contractual obligations, reads requirement conventions and checks new security notices against actual assets. The hall and contract are invented; the source distinctions come from the named syllabus and RFCs.

READ BRIEF