The Reference Desk: Glossary and Diagnostic Guides
Introductions, exercises and summaries stay visible.
52.0 What this chapter gives you#
- This chapter is a place to return when a term, query or failure needs a precise next step. It is not a substitute for the explanations earlier in the book; it connects their vocabulary and methods to reusable reference material.
- The complete A–Z glossary follows the chapter in the full edition and is available in the browser reader. Each entry points back to its teaching section. The sources register records document titles, versions, URLs and consultation dates.
- Stable references such as 26.4 and 47.3 mean the same section across the complete PDF, volume editions and website. Printed page numbers may differ between editions, so chapter/section identifiers are the reliable cross-edition route.
- The diagnostic paths below begin with observation and scope. They do not give blanket permission to run destructive commands, broaden access or modify an unfamiliar live database.
52.1 Plain-to-technical glossary#
52.1.1 PLAIN — in simple words#
- A useful definition connects an everyday idea to a precise technical meaning. It also marks where that meaning changes with context or implementation.
- Similar words do not always mean the same thing. A database, database engine, database server and database file refer to different parts of the system.
- Begin with the plain meaning, then use the linked section to inspect assumptions and mechanisms. Memorising a term without its boundary can make a mistaken explanation sound more convincing.
- The A–Z register collects the vocabulary blocks from the manuscript. Where a term appears in several contexts, the relevant definitions and locations remain visible rather than being silently merged into one misleading sentence.
52.1.2 PLAIN — a picture in your head#
- A city map tells you where a street is; it does not describe every room in every building. The glossary locates an idea, and the chapter supplies the detailed route.
- Two streets can share a familiar name in different towns. In the same way, “consistency” can refer to several distinct properties unless the surrounding discussion names the model.
- Where the comparison breaks: technical vocabulary is not governed by one universal naming authority. Standards, product documentation and informal usage can use related words differently.
52.1.3 PLAIN — a worked example#
- Look up transaction. The everyday meaning is a group of related changes treated as one controlled unit. The technical discussion adds commit, rollback, isolation, durability and the boundary around external effects.
- Look up idempotency. The plain idea is that repeating the same intended operation need not produce another effect. Chapter 26 and the capstone add scoped identity, payload comparison, transaction placement and retention.
- Look up consistency before using it in an argument. A business invariant, a replica freshness requirement and linearizability are different claims. A system can satisfy one and fail another.
- A glossary answer becomes useful when it leads to the relevant question: Which changes? Which identity? Which observation order? Which failure? Which version of the product?
52.1.4 PLAIN — what is really happening inside#
- The glossary builder extracts named terms and their definitions from the WORDS blocks and associates them with chapter/section identifiers.
- The website groups entries alphabetically and offers text filtering. Chapter search uses titles, section terms and chapter text rather than pretending a keyword match establishes technical correctness.
- A repeated term can have several entries or locations. That is preferable to discarding context simply to make a smaller count look tidier.
52.1.5 TECHNICAL — the engineer’s version#
- Use the source register when a definition is standard- or product-specific. The glossary’s role is navigation; it does not supersede the cited specification.
- Treat identifiers in a reference system as stable keys. A title can be edited while a chapter number and section identity preserve links across formats.
- Generated vocabulary is checked for resolvable source locations. Mechanical extraction does not independently verify every definition; factual accuracy still depends on the manuscript and its cited evidence.
52.1.6 WORDS — remember these#
Glossary: a vocabulary reference — definitions connected to their contexts and teaching locations. Cross-reference: a route to related material — a stable chapter, section or source identifier rather than a guessed page number. Implementation boundary: where a claim stops generalising — the product, version and configuration for which a detail is established.
52.2 SQL and data-type reference#
52.2.1 PLAIN — in simple words#
- Read a query as a precise question about a chosen population. First understand what one input row means, then what joins, filters and grouping do to that population.
- Choose a type by the value’s meaning. Counts, money, names, dates, instants and missing values should not become interchangeable strings merely because strings are easy to store.
- Use explicit ordering when order matters and bound values when inputs come from outside the SQL text.
- A correct query still needs appropriate authority, transaction context and an honest interpretation of its result.
52.2.2 PLAIN — a picture in your head#
- Mira asks Dev to take particular folders, match related pages, discard ineligible entries, group the remaining facts and sort the answer.
- Each instruction changes the question. Accidentally matching each order page to every packing slip can multiply the answer even when Dev adds the numbers correctly.
- Where the comparison breaks: a database optimiser can execute a logically equivalent plan in a different physical order. The readable conceptual sequence is not a claim about the engine’s exact execution schedule.
52.2.3 PLAIN — a worked example#
- The canonical agreed-line calculation is quantity multiplied by agreed unit price in paise, summed over the intended four lines. Its result is 28,650 paise. It is not a sum of today’s catalogue prices.
- This small reference table connects common intentions to important cautions. It is not a complete SQL grammar.
| Intention | Common SQL form | Check before trusting the result |
|---|---|---|
| Choose values | SELECT expressions FROM relation | What does one input row mean? |
| Select a population | WHERE predicate | How are NULL and excluded rows treated? |
| Connect facts | JOIN … ON complete_key | Can either side multiply the other? |
| Preserve unmatched rows | LEFT JOIN | Does a later WHERE remove them again? |
| Summarise groups | GROUP BY, SUM, COUNT | What is the output grain and denominator? |
| Retain detail with a calculation | OVER (…) | What partition, ordering and frame apply? |
| Specify order | ORDER BY, explicit tie-breaker | Are ties and missing values defined? |
| Change selected rows | UPDATE … WHERE … | Is the complete key and expected version included? |
| Bind input values | Driver parameters | Values are not SQL identifiers or permissions |
| Complete a unit of work | COMMIT or ROLLBACK | Which component owns the transaction? |
COUNT(*)andCOUNT(nullable_column)can differ because they count different things. Preserve the denominator required by the question rather than choosing whichever expression gives the more attractive number.SUM(DISTINCT amount)does not generally repair a multiplied join. Two legitimate lines can have equal amounts and both should count. Fix the grain and relationship, not the coincidence of values.
52.2.4 PLAIN — what is really happening inside#
- Parsing establishes a valid statement; name/type resolution connects it to objects and operations; planning chooses access paths; execution produces the result under the database’s rules.
- Representation decisions affect correctness. An integer amount needs a unit and range; a decimal needs scale and rounding policy; a timestamp needs a meaning and time basis.
- A constraint can reject selected invalid values. It cannot determine whether a supplied measurement, currency or identity matches the outside world without a trusted observation or policy.
52.2.5 TECHNICAL — the engineer’s version#
- PostgreSQL and SQLite are not interchangeable implementations of every type, function or transaction behaviour. Use the product/version source attached to the example, especially around NULL, typing, locking and schema changes. [S58] [S80] [S86]
- A compact representation checklist follows. It describes design questions rather than claiming one universally best physical type.
| Value meaning | Representation decision | Required surrounding contract |
|---|---|---|
| Count | Integer with a suitable range | Unit, allowed sign, overflow behaviour |
| Money | Exact decimal or integer minor units | Currency, scale, rounding and agreement time |
| Identifier | Text, integer or structured key | Scope, stability, generation and reuse policy |
| Name | Unicode text | Comparison, normalisation and display rules |
| Instant | Aware time representation | Time scale, zone/offset interpretation and precision |
| Local date | Calendar date | Calendar and policy context; not an instant by itself |
| Unknown value | NULL or explicit status model | Unknown versus not applicable versus invalid |
| Measured quantity | Value plus unit and context | Method, precision, uncertainty and observation time |
- Keep SQL syntax examples and executable files aligned. A code block labelled as a sketch should not be treated as a complete application merely because it resembles runnable SQL.
52.2.6 WORDS — remember these#
Query grain: what one result row means — the level created by joins, projection and grouping. Tie-breaker: an additional ordering key — a rule making otherwise tied results deterministic where required. Representation contract: meaning attached to stored values — units, range, missingness and interpretation beyond the physical type.
52.3 Diagnostic decision guides#
52.3.1 PLAIN — in simple words#
- A symptom is the starting observation, not the conclusion. “The total is wrong” and “the database is broken” are different statements.
- Choose a small next observation that can distinguish plausible explanations. Broad changes made before preserving evidence can destroy the information needed to understand the failure.
- Keep read-only inspection separate from repair. A diagnostic query does not authorise deleting the rows it happens to find.
- Record the database, tenant, time, revision and exact query or operation involved. A result from the wrong environment can be perfectly accurate and irrelevant.
52.3.2 PLAIN — a picture in your head#
- A shop light does not turn on. Mira first checks whether one bulb, one room or the whole building is affected. She does not immediately replace every wire.
- The scope of the symptom determines the next useful check. A systematic route reduces guessing and avoids damaging evidence.
- Where the comparison breaks: data-system failures can be partial and concurrent. The same query can legitimately observe different states under different snapshots or replicas.
52.3.3 PLAIN — a worked example#
- Use this wrong-total route on a disposable copy or through authorised read-only inspection:
Unexpected total
-> confirm metric definition, unit and population
-> confirm tenant, time basis and source version
-> compare contributing primary keys
-> inspect join multiplicity before aggregation
-> inspect NULL, filters and unmatched rows
-> compare agreed values with mutable catalogue values
-> reconcile raw contributions and declared exclusions
-> preserve evidence; propose a bounded correction- Use this slow-query route without assuming an index is the answer:
Slow request
-> locate where the time is spent
-> separate queueing, locks, database work and network
-> capture query, parameters, plan and observation scope
-> compare estimates with observed work where safe
-> check workload, selectivity, memory and storage waits
-> test one justified change on representative data
-> compare equal results and full latency distributions- Use this timeout route before retrying a write:
Caller did not receive a result
-> preserve the original request identity
-> ask whether the operation's status can be queried
-> replay only under its documented same-command policy
-> distinguish committed, rejected and still-unknown outcomes
-> do not create a new operation merely to make uncertainty disappear- Each route chooses an observation. None says that a symptom alone proves data corruption, failed commit or insufficient hardware.
52.3.4 PLAIN — what is really happening inside#
- Diagnosis compares hypotheses with observations. A good next check eliminates or narrows explanations while changing as little relevant state as possible.
- Evidence can be time-sensitive. Query plans, lock waits and replica lag can change; record their observation window rather than presenting them as permanent properties.
- A repair should have its own preconditions, scope, validation and recovery plan. The urgency of a symptom does not remove those responsibilities.
52.3.5 TECHNICAL — the engineer’s version#
- For stale reads, check the requested consistency contract, routing, snapshot and observed replication position. A follower being behind is not automatically corruption.
- For missing records, check authorisation filters, tenant scope, transaction outcome, lifecycle action and environment before attempting restoration. A correctly hidden row and a lost row require different responses.
- For suspected corruption, preserve the original evidence and use engine-specific checks on an appropriate copy. Structural checks, checksums and business reconciliation establish different properties; consult Chapters 31–32 before repair.
52.3.6 WORDS — remember these#
Symptom: what was observed — a result needing explanation, not an already-proven cause. Hypothesis: a candidate explanation — a claim that should be distinguished from alternatives through suitable evidence. Bounded observation: a deliberately limited check — a query or measurement with named scope and minimal unintended change.
52.4 Design-review questions#
52.4.1 PLAIN — in simple words#
- A design review should make hidden assumptions visible. Ask what each record means, who may act and what happens when requests overlap or answers are lost.
- Review the whole path, not only the database diagram. Inputs, workers, caches, exports and recovery procedures can invalidate an otherwise careful schema.
- Require a counterexample to each important guarantee. Asking “How could this fail?” helps turn an attractive description into a testable contract.
- A reviewer can identify evidence gaps without claiming the design is impossible. The next step is a targeted test or clarification, not an invented green verdict.
52.4.2 PLAIN — a picture in your head#
- Before building a new storeroom, Mira asks what it must hold, who gets a key, how deliveries enter and what happens if the only door is blocked.
- A beautiful floor plan is incomplete until those operating questions have answers.
- Where the comparison breaks: software can change very quickly. A review of one version should not automatically cover a later edit to a constraint, permission or retry policy.
52.4.3 PLAIN — a worked example#
- Apply these questions to the capstone before extending it:
| Area | Review question | Example evidence |
|---|---|---|
| Meaning | What does one row assert? | Grain, units, provenance and exclusions |
| Identity | Where is each key unique? | Scoped key and reuse counterexamples |
| Authority | Who may perform each action? | Allow/deny matrix and effective-role checks |
| Change | Which facts must commit together? | Interrupted-operation state comparisons |
| Concurrency | Which overlapping schedule would break the rule? | A failing schedule and a tested protocol |
| Replay | What is the same intended request? | Identity, payload comparison and retention |
| Copies | Which reads may be stale? | Routing and declared consistency model |
| Recovery | What can actually be restored? | Isolated restore with checked records |
| Lifecycle | Which copies remain after deletion? | Inventory and explicit residual scope |
| Operations | What objective and capacity assumptions apply? | Workload, measurements and response owners |
- A new payment integration changes the external-effect boundary. The local task’s once-only test does not become proof of once-only charging.
- A new tenant export changes access coverage. The original detail-query test is not enough; the export’s scope and content need separate tests.
- A new retention policy changes replay guarantees if it removes request identities. The design must state what happens after that protection window ends.
52.4.4 PLAIN — what is really happening inside#
- Reviews compare the proposed mechanisms with requirements and counterexamples. They expose which promises rely on unverified assumptions.
- A small set of well-chosen adversarial cases can be more informative than a large set of near-identical successes. The goal is evidence coverage, not a decorative test count.
- Review findings should retain severity, scope, proposed response and verification status. Author approval of a plan does not by itself close an implementation defect.
52.4.5 TECHNICAL — the engineer’s version#
- Separate safety properties, progress properties and operational objectives. “Never create two accepted orders for one scoped request” differs from “eventually deliver every valid notification” and from “respond within 200 ms.”
- Identify failure assumptions: process crash, device loss, network partition, byzantine behaviour or accidental operator changes. A mechanism designed for one fault model should not inherit another model’s guarantee silently.
- The review worksheet is an original reference aid. It records questions, not an automatic approval algorithm for every possible data system.
52.4.6 WORDS — remember these#
Safety property: a prohibited outcome never occurs — a correctness claim such as no duplicate accepted effect under the stated model. Progress property: required work can eventually advance — a liveness claim dependent on assumptions about failures and resources. Fault model: the failures considered — the boundary within which a mechanism’s reasoning and tests are intended to apply.
52.5 Test and recovery templates#
52.5.1 PLAIN — in simple words#
- A test record should let another person repeat the important steps and understand the result. “It worked” omits the input, environment, operation and expected outcome.
- A recovery record needs a specific source, destination and time boundary. Restoring the wrong backup correctly is still the wrong recovery.
- Failed and skipped steps should remain visible. They are not automatically covered by the successes around them.
- Templates organise evidence; filling the boxes does not manufacture observations that were never made.
52.5.2 PLAIN — a picture in your head#
- A recipe notebook records ingredients, oven setting and actual result. Leaving out the temperature makes a successful trial hard to repeat.
- A recovery checklist records which box was opened and which pages were compared. Checking only that a box exists cannot fill the result column.
- Where the comparison breaks: execution environments can differ invisibly through library versions, configuration and concurrent work. Reproducibility requires more than copying visible commands.
52.5.3 PLAIN — a worked example#
- Use this original bounded-test template for a new exercise:
Claim:
Candidate identity:
Environment and versions:
Input identities and scope:
Assumptions and excluded failures:
Operation and authority:
Expected output and state:
Actual output and state:
Negative or interruption control:
Result: pass / fail / error / skipped / unresolved
Evidence location:
What this result does not establish:- Use this recovery template before treating a backup as useful evidence:
Recovery purpose and authorised scope:
Backup identity, time and dependencies:
Required keys/configuration, without embedding secrets:
Fresh isolated destination:
Target recovery point and declared objectives:
Procedure and stop conditions:
Structural checks:
Key/value and application reconciliation:
Post-backup lifecycle decisions to reapply:
Access-boundary checks:
Actual duration and unresolved loss interval:
Approval required before serving restored data:- For a replay test, record both attempts with the same scoped identity and compare effects after each. A response that merely repeats the same text is not enough if stock changed twice.
- For a denied-operation test, inspect state and returned information. The error message is only one observable result.
52.5.4 PLAIN — what is really happening inside#
- A test harness constructs controlled conditions, invokes the candidate and checks assertions. A recovery rehearsal applies a procedure to a selected historical state and validates the resulting destination.
- Both need a reproducible identity for the tested material. Digests support byte comparison, while version and environment records explain how those bytes were used.
- A result can be narrow and still valuable. The discipline is to keep the useful finding without converting it into a wider unsupported guarantee.
52.5.5 TECHNICAL — the engineer’s version#
- Use machine-readable reports alongside human interpretation. Record failures, errors and skips distinctly rather than treating every completed process as a successful test. [S201]
- Restore evidence should compare business-level identities and values in addition to engine checks. A structurally valid database can still contain the wrong dataset.
- Keep credentials out of the evidence bundle. Record how authority was established without copying the secret material needed to exercise it.
52.5.6 WORDS — remember these#
Test fixture: the controlled input state — synthetic or appropriately authorised data used for a specified check. Reproducibility record: enough context to repeat a result — candidate, inputs, environment, operations and observations. Skipped check: a check not executed under current conditions — neither a pass nor proof of failure of the underlying feature.
52.6 Source and version register#
52.6.1 PLAIN — in simple words#
- Technical behaviour changes across products and versions. The reference beside a claim tells you where its documented meaning came from and which scope was consulted.
- A standard, a vendor implementation and a teaching model are different sources of authority. An original shop example can demonstrate arithmetic without becoming an industry standard.
- Read sources when applying a mechanism to real work. The book provides a path to them, not a promise that every future release preserves every detail.
- The final source register combines the earlier source identifiers with the added references. Old consultation dates remain historical; they are not relabelled as newly rechecked merely because a new PDF was built.
52.6.2 PLAIN — a picture in your head#
- Mira keeps the instruction manual for the exact machine in the shop. A manual for another model may look similar but describe different buttons and limits.
- A handwritten experiment note is useful too, provided it says what was tried and does not pretend to be the manufacturer’s specification.
- Where the comparison breaks: online documentation can change at an unchanged address. A URL alone is weaker evidence than a versioned document plus a consultation date and recorded scope.
52.6.3 PLAIN — a worked example#
- A paragraph marked [S86] refers to Python’s version-3.13 sqlite3 documentation. It does not establish which exact Python or SQLite build a reader’s computer uses; the executable report records the actual authoring runtime separately.
- A paragraph about PostgreSQL 17 row policies marked [S187] describes that documented feature and its exceptions. The local SQLite lab does not become a PostgreSQL test because the two appear in one chapter.
- An invented queue with 120 arrivals/s and 100 completions/s is an original arithmetic model. Its result follows from its assumptions, not from a measurement of a hosting plan.
- For an applied design, record the selected source version, relevant configuration, local experiment and remaining uncertainty together. No single reference establishes every layer of the final system.
52.6.4 PLAIN — what is really happening inside#
- The publication builder resolves source identifiers to entries containing author or organisation, title, URL, consultation date and a short description of supported scope.
- Manuscript references are checked for missing identifiers. That mechanical check prevents dangling citations; it does not prove that every citation is sufficient or that every interpretation is correct.
- Readers should recheck version-specific details before deployment. When a source changes, preserve the earlier statement’s historical context rather than pretending it always described the new version.
52.6.5 TECHNICAL — the engineer’s version#
- The final package includes canonical Markdown, structured chapter metadata, glossary/source registers, executable exercises and build/QA records. Derived formats use the same chapter numbering and headings.
- The cited materials include official database and language documentation, standards, original research and author-hosted technical texts. The synthetic shop, diagrams, chosen protocols and worked arithmetic are original teaching material unless explicitly attributed otherwise.
- No part of the source register claims independent technical certification of the book. Source support, local testing, visual review and publication approval remain distinct kinds of evidence.
- The final lesson is the method used throughout: define meaning, name the boundary, inspect the mechanism, test the relevant case and state only what follows. That method is transferable beyond the particular tools in these pages.
52.6.6 WORDS — remember these#
Primary source: the originating documentation or research — evidence closer to the specified behaviour than a second-hand summary. Consultation date: when a source was checked — a historical marker that does not turn a moving page into an immutable specification. Version register: the declared implementation/document context — a record distinguishing documented versions from the runtime actually tested.
52.97 Practice and worked answers#
- Question: Which reference survives a change in volume pagination? Answer: The stable chapter and section identifier, such as 47.3.
- Question: What is the first check for an unexpected total? Answer: Confirm the metric definition, units, population and authorised scope before proposing a repair.
- Question: Why is SUM(DISTINCT amount) not a general join repair? Answer: Equal legitimate values can be distinct contributions; the relationship grain must be corrected.
- Question: What identity should be preserved after a write timeout? Answer: The original scoped request identity under its documented replay contract.
- Question: What distinguishes a safety property from a latency target? Answer: Safety forbids a defined outcome; latency targets quantify service performance over a stated population and window.
- Question: Does a skipped test count as passed? Answer: No. It records a check not executed under the current conditions.
- Question: Does a valid citation ID establish independent accuracy review? Answer: No. It establishes a resolvable reference, not universal correctness or independence.
- Question: What is the book’s most reusable skill? Answer: Connecting a precisely defined claim to a mechanism and suitable bounded evidence, while preserving what remains unknown.
52.98 Common wrong ideas#
- Wrong: Knowing a term means knowing its guarantees. Right: Read the definition’s context, assumptions and implementation boundary.
- Wrong: Page numbers are stable across every edition. Right: Chapter and section identities are the stable cross-edition route.
- Wrong: A symptom is already a diagnosis. Right: Use observations to distinguish competing explanations.
- Wrong: A faster query is necessarily the same question. Right: Compare results, population and semantics as well as time.
- Wrong: A complete template supplies missing evidence. Right: Fields must contain actual observations or explicit unresolved status.
- Wrong: A cited product’s example tests another product. Right: Documentation and runtime scope must remain distinct.
- Wrong: A file hash proves its publisher’s identity by itself. Right: Integrity comparison needs a trusted expected value or distribution context.
- Wrong: A reference book can remove every uncertainty. Right: It can teach readers to identify, bound and investigate uncertainty accurately.
52.99 Chapter summary in 20 lines#
- Use the reference desk to locate precise ideas and next steps.
- Connect plain meanings to technical definitions and their limits.
- Prefer stable chapter and section identifiers across editions.
- Preserve context when one term has several meanings.
- Read SQL as a question about a declared population.
- Check grain before joins and aggregation.
- Choose representations by meaning, units and range.
- Treat NULL and missing status deliberately.
- Specify ordering and tie-breakers where needed.
- Preserve request identity after an uncertain write outcome.
- Diagnose from symptoms rather than assuming a cause.
- Choose bounded observations before repair.
- Separate safety, progress and performance requirements.
- Ask for counterexamples to important guarantees.
- Record exact candidates, inputs and environments.
- Distinguish pass, fail, error, skip and unresolved states.
- Restore into isolation and compare useful records.
- Keep primary sources and version context accessible.
- Do not turn local checks into unearned universal certification.
- Meaning, mechanisms and evidence belong together in every data system.