AAmit’s LibraryLEARN · PRACTISE · REFLECT

Data for decisions and managerial involvement × Databases

Business lens: Data for decisions and managerial involvement · Technology lens: Databases

Reading scope: Original synthetic teaching. Sources support selected background, not invented organisations, figures or tested outcomes.

A structural rule is not a factual investigation

A manager asks whether all imported order amounts are valid because the database has a positive-value constraint. Database rules can protect specified structure, but their meaning and treatment of missing values must be understood before a report relies on them. Begin with the field definition, permitted states and business use. An amount might be missing, incorrectly entered or positive but factually wrong. The management question is whether the record supports the intended decision, not merely whether it can be stored. A database constraint is a useful control when it matches the agreed requirement and is accompanied by appropriate source evidence and exception handling.

Distinguish positivity and presence

The selected PostgreSQL documentation explains that a check condition permits a null result, so a positivity check alone does not require a value to be present. A separate not-null rule can express presence where that is required. This is PostgreSQL-specific background; a learner should inspect the chosen system rather than assume every database behaves identically. Use an invented import fixture with known categories and state the exact intended rule. The business owner decides whether an absent amount is permissible at this stage. A draft order awaiting quotation may legitimately lack a final amount, whereas a posted transaction could require one under the local contract. The teaching rule must preserve that context.

Work through the twenty-record fixture

The synthetic import contains twenty amounts: twelve known positive values, four missing values represented as null and four nonpositive values. Under the stipulated PostgreSQL positivity check alone, the twelve positives and four nulls pass, so sixteen of twenty pass the structural condition: 80%. Requiring both presence and positivity allows only twelve of twenty: 60%. The difference is four records, or twenty percentage points. Neither result establishes factual correctness of the twelve positives. A positive amount could have the wrong currency, unit or source value. The counts show the exact declared rule's effect, not an overall data-quality score or a reason to classify every missing draft amount as fraudulent.

Responsibilities around an exception queue

The source owner supplies the amount meaning and missing-value reason. Data engineers or database administrators implement the agreed rules and record rejected rows. Finance or the relevant business owner determines whether the record is suitable for the intended report. Management owns the decision to delay a report, publish a scoped provisional result or seek a correction. Avoid replacing missing amounts with zero simply to clear the import, because zero is a substantive value with its own meaning. An exception needs an owner, evidence and disposition. Consultation should distinguish a source defect from a legitimate incomplete state before the team tightens a rule across all records.

Test the policy and its correction path

Propose a small constraint test with a positive, zero, negative and null value under both rules. Preserve the original rejected input and explain how an authorised correction would be reviewed. Changing the rule can affect reports and workflows, so inspect downstream assumptions before treating stricter storage as automatically better business information. This reading is a synthetic fixture and rule interpretation, not an executed PostgreSQL lab, a production migration or complete factual data validation. The existing constraint lesson supplies a practical starting point; learners should check actual behaviour in an appropriate environment and keep the local rule separate from a universal claim about good data.

Questions and learning progression

Who decides whether presence is required? Whom does a rejected order delay? Whose source evidence supports the amount? What does null mean here? Where are exceptions recorded? When may an order be incomplete? Why do eighty and sixty percent differ? Which positive record still needs semantic evidence? How should a corrected row be accepted? Foundation work separates missing and nonpositive values. Undergraduate work sketches both rules and calculates the pass counts. Postgraduate work critiques workflow context, semantics and migration effects. Research work proposes a study of structural and factual quality with defensible measures. The portfolio contains the fixture, expected outcomes and an exception process that respects both database behaviour and managerial information needs.

Study questions and answers

How many pass positivity alone in the stipulated PostgreSQL case?

Twelve positives plus four nulls: sixteen of twenty, or 80%.

Marking guide: Credit sixteen of twenty, or 80%, under the stipulated positivity-only fixture including four nulls. Distinguish absent values from positive evidence.

How many pass presence and positivity?

Twelve of twenty, or 60%, under the defined fixture.

Marking guide: Credit twelve of twenty, or 60%, satisfying both stipulated presence and positivity.

Does a passing positive amount establish factual accuracy?

No. Currency, unit, source and meaning require separate evidence.

Marking guide: Credit passing validation versus factual accuracy; require currency, unit, source and meaning checks.

Practice task

Create a twenty-record constraint fixture, state expected outcomes for presence and positivity and design an authorised exception-correction queue.

Sources and further reading

  • PostgreSQL — Constraints
    Scope: Selected positivity and presence-rule semantics; not actual database execution or factual source validation.
    Access: Public selected reading without an account; service entitlements, certificates and hosted execution not verified.

Related chapters

Interactive practice

Open workshop

Open interactive matrix reading