AAmit’s LibraryLEARN · PRACTISE · REFLECT

Customer journeys × Databases

Business lens: Customer journeys · Technology lens: Databases

Reading scope: Original fictional teaching; same-author arithmetic checks are not independent editorial validation.

The customer relationship depends on interpretable records

A fictional service business moves booking records into a database and expects duplicate problems to disappear. Customers still receive conflicting reminders because some rows repeat an order and others have missing account references. Customer journeys and databases meet at the identity and state of the obligation. Define customer, booking, event and notification relationships before treating each row as another promise. Structural checks can enforce selected rules, but a valid reference does not establish that the customer’s need was understood or fulfilled. Begin with the record another staff member needs to continue service without asking the customer to reconstruct the organisation’s errors.

Define constraints with the service owner

Support defines an episode, the booking team owns acceptance and IT implements keys and relationships. A unique identifier should not silently represent two different bookings. A required account relationship may be appropriate for one state but unavailable during an approved guest request. Decide how staging and exceptions work instead of inventing account details solely to satisfy a constraint. Retain correction and cancellation history. A database schema can preserve structure while storing an impossible appointment or wrong customer contact. Review substantive meaning with the relevant business roles. The purpose is a consistent service account, not a high pass count for structural checks alone.

Worked booking-import coverage

The invented import contains eighty rows: sixty distinct bookings with valid references, fifteen distinct candidates with missing account references and five rows repeating already represented bookings. There are seventy-five distinct candidates after separating repeats. Initial supported relationship coverage is 60/75 = 80%; raw-row coverage is 60/80 = 75%. Evidence-backed reconciliation recovers eight of the fifteen missing references. Supported candidates become sixty-eight of seventy-five, approximately 90.67%, with seven still unresolved. The five repeat events remain traceable. A forced join using a similar name would not count as a legitimate recovery without sufficient evidence that the relationship is correct.

Use exceptions to protect the journey

The seven unresolved candidates need a defined service path. They may involve guest bookings, a source error or another condition; the example does not specify which. Do not delete an accepted obligation merely because its relationship is incomplete. Keep a restricted staging or exception record where the actual service design permits and assign correction ownership. Notifications should not assume that every structurally linked candidate has a valid contact or fulfilled booking. Check the customer-facing effect of a correction, including whether an obsolete reminder is withdrawn. Better structural coverage supports continuity, but it does not certify identity, consent or complete service quality.

Practice a staged booking ledger

Use the existing database-constraints lesson to define canonical booking keys, source events and a missing-reference state. Build the eighty-row fictional import, seventy-five candidates and eight documented recoveries. Reproduce 75%, 80% and 90.67% with their denominators. Your portfolio should include a structurally valid but substantively wrong appointment and an exception path for the seven unresolved candidates. This extends bounded database teaching; it runs no new migration fixture or live identity-resolution service. Later actual query outputs and correction evidence should be retained separately from the stipulated expected partitions.

Questions and progressive depth

Who defines the booking, and Whom should IT ask about guest requests? Whose reference is unresolved? What is unique, Where is the source event retained, and When does a candidate become canonical? Why is structure not truth? Which match needs evidence? How are reminders corrected? Foundation learners distinguish booking and repeated row. Undergraduate learners design keys and calculate coverage. Postgraduate learners critique staging, identity and substantive checks. DBA/research learners investigate a bounded relationship-quality mechanism with authorised evidence and independently checked outcomes. For revision, explain why sixty-eight supported candidates still leave seven distinct candidates unresolved and five repeat rows in the source history, and why a database constraint cannot establish that the promised appointment is feasible.

Study questions and answers

What is initial distinct relationship coverage?

60/(80−5) = 60/75 = 80%; raw-row coverage is 75%.

Marking guide: Credit 60/75=80% distinct candidate versus 75% raw-row coverage.

What follows eight legitimate recoveries?

68/75 ≈ 90.67% supported candidates; seven remain unresolved.

Marking guide: Credit 68/75=90.67% with seven unresolved after eight recoveries.

Why not force a similar-name join?

Similarity is not sufficient identity evidence; a forced match can attach the obligation to the wrong customer.

Marking guide: Similar name is insufficient identity; forced join can attach obligation to wrong customer.

Practice task

Specify a staged booking ledger with keys, evidence-backed relationships and notification corrections.

Practice bridge

  1. Specify a staged booking ledger with keys, evidence-backed relationships and notification corrections.
  2. Reproduce the worked arithmetic, change one assumption and label invented evidence separately from actual practice observations.

Open connected lab

Boundary: Original fictional exercise connected to an existing bounded or guided lesson. No new executable fixture, external platform execution or catalogue lab claimed.

Related chapters

Interactive practice

Open workshop · Open runnable practice · Open lab lab-15

Open interactive matrix reading