AAmit’s LibraryLEARN · PRACTISE · REFLECT

Quality and reliability × Databases

Business lens: Quality and reliability · Technology lens: Databases

Reading scope: Original synthetic teaching; selected primary background and same-author checks are not independent validation.

Structural rules support business quality

A fictional distributor stores inspection results in a relational database. Keys, required fields and permitted status values help prevent inconsistent records, but a structurally valid row can still describe an incorrect inspection. Define quality across two layers: conformance to the database rules and support for the business interpretation. A product identifier may exist while the inspector selected the wrong product. A status may be permitted while the evidence for that status is absent. Computers can enforce explicit relationships efficiently; humans must still define those relationships, examine their meaning and resolve records that do not fit the intended process.

Coordinate definitions before constraints

Quality staff explain which inspection states exist, Operations explains product and batch identities, and Finance identifies records used for supplier claims. The database team turns agreed definitions into constraints and reports rejected writes. Consultation is essential before making a field mandatory: staff may need a legitimate pending state when an inspection cannot yet be completed. Replacing every missing value with a fabricated default makes the database look complete while reducing truthfulness. A versioned schema and an agreed migration procedure help consumers understand changes. Record who decides a disputed status and who applies the resulting data correction.

Worked conformance and evidence case

An invented set contains 60 inspection rows. Forty-eight meet structural rules and have the stipulated inspection evidence. Eight meet structural rules but lack evidence, and four fail a required relationship rule. Structurally conforming coverage is 56/60, approximately 93.33%; evidence-supported conformity is 48/60, or 80%. Suppose the four relationship failures are corrected against documented product records, and each also has valid inspection evidence. Evidence-supported conformity becomes 52/60, approximately 86.67%, and structural conformity becomes 60/60, or 100%. The eight evidence gaps remain. Calling the entire dataset verified merely because all constraints now pass would be incorrect.

Correction should preserve the history

Keep the original failed relationship, the authoritative correction evidence and the approved replacement. Deleting rejected rows from the report can improve the displayed percentage without improving the population. If an inspection is legitimately cancelled, record the disposition and explain whether the original population or a separately defined active population is being analysed. The denominator must follow a stated rule. A correction that moves a row to an existing product is not sufficient unless that product is actually the intended one. A database can enforce existence; it cannot infer the real-world identity from a convenient matching value.

Practice with constrained records

Extend the existing database-constraints lesson with a synthetic inspection table and a product table. State required relationships and permitted states before entering the sample rows. SQLite's free CREATE TABLE documentation offers selected structural background; the worksheet's business evidence rule is an original teaching addition. Use a separate evidence-status field so structurally accepted rows can still remain under review. Record actual database rejection messages separately from the invented 60-row totals. This exercise does not introduce a new production database or certify data accuracy. The portfolio should include one accepted-but-unsupported record and explain why it remains a quality concern.

Enquiry for a trustworthy data model

Who defines the inspection state and Whom does a wrong product association affect? Whose evidence supports the correction? What relationship is required, Where is the authoritative product record and When does an inspection become final? Why can a valid row be untrue? Which constraint is appropriate for a pending outcome? How can the reviewer trace a corrected record? These questions reveal the division between technical enforcement and business judgement. Good interoperability uses shared definitions and explicit unresolved states, allowing departments to exchange records without silently assuming that another team's successful database write guarantees meaningful quality.

Levels and research contribution

Foundation learners distinguish a permitted value from an evidenced outcome. Undergraduate learners reproduce both coverage measures and the four-record correction. Postgraduate learners design a migration and critique default values, deleted failures and ambiguous identifiers. Research learners investigate whether explicit evidence states improve correction time or downstream decisions, selecting a comparison and observing real outcomes under an appropriate protocol. A DBA contribution could explain the coordination mechanism between database ownership and quality review. Retrieval practice should present a row that passes every structural rule and ask what business evidence is still missing. That challenge prevents constraint terminology from replacing understanding.

Study questions and answers

How do the two initial quality rates differ?

Structural conformity is 56/60 ≈ 93.33%. Evidence-supported conformity is 48/60 = 80%; eight structurally valid rows lack evidence.

Marking guide: Credit 93.33% structural and 80% evidence-supported conformity; eight valid rows lack evidence.

What remains after correcting the four relationship failures?

Structural conformity is 100%, but evidence-supported conformity is 52/60 ≈ 86.67%. Eight evidence gaps remain.

Marking guide: Credit 100% structural but 86.67% evidence-supported, eight gaps retained.

Why must rejected rows remain visible in the audit population?

Deleting failures can improve the reported rate through denominator removal. A documented disposition and population rule are needed to interpret any exclusion.

Marking guide: Preserve audit failures/dispositions; denominator deletion can artificially improve reported quality.

Practice task

Add structural and evidence states to a synthetic inspection schema, preserving rejected rows and documented corrections.

Practice bridge

  1. Add structural and evidence states to a synthetic inspection schema, preserving rejected rows and documented corrections.
  2. Reproduce the stated arithmetic, change one valid assumption and distinguish actual lesson observations from the invented case.

Open connected lab

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

Sources and further reading

  • SQLite CREATE TABLE
    Scope: Selected structural constraint background; passing constraints does not establish business truth.
    Access: Free selected official background; no certificate or enrolment claim.

Related chapters

Interactive practice

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

Open interactive matrix reading