Lawfare Academy · Complete Digital Business and AI Applications edition 5

Build a data foundation whose permissions survive every representation

Preserve the original current-context decision

At 12:00 the original client-A example permits A2 only: A1 expired at 11:00 and B1 belongs to B even though its similarity score is highest. The historical 10:00 question has a different time scope and still needs authorization. Preserve the original revocation, cache, export and malicious-document examples. This studio adds the full data-management, relational/nonrelational, warehouse, learning-data, informatics and cyber-resource preparation formerly assigned to outside chapters. It is supplied on site through original Academy methods and the application reasoning here.

The included synthetic enrollment, event, Q-order, account-capacity, classifier, Cedar and paid-order fixtures are **independent method examples**. They do not describe this course's clients, Cypress, one combined firm or actual Academy learners. No study query is directed at a real account or learner table. Their source files and prior editions remain preserved.

Data management is a lifecycle and an authority model

Define the purpose before collecting a field. Identify who may supply it, the evidence required, its unit and time basis, who may use it and how a correction propagates. The lifecycle includes acquisition, validation, storage, permitted transformation and use, monitoring/correction, retention and authorized disposal. A retention decision needs applicable facts and authority; storing forever is not a neutral default. This unit invents no legal period. Florida is the default when an applicable contemporary state-law example is needed, with federal and explicit comparative requirements distinguished.

A data owner decides definitions and permitted use within the organization's authority. A steward maintains practical quality and exception processes. A database administrator operates structural, access, backup and performance controls. An analyst builds a measure under a documented contract. One person can hold several roles, but that does not make the decisions interchangeable. A well-maintained database of material collected without authority is still a problem.

The conceptual model identifies entities and relationships: client, document, revision, permission grant, review and action proposal. The logical model specifies attributes, keys, cardinalities and domains. The physical model chooses actual tables, documents, indexes and storage. Metadata connects the representations to source, unit, time, status, ownership and correction rules. A title or filename is not automatically a durable identifier. A document number unique within a client needs that scope in its key or another justified global identity.

A DBMS provides organized definition, storage, retrieval, constraint, transaction and recovery facilities. Its query processor translates a declared request into an execution strategy; catalogs record structural definitions; storage/index mechanisms affect access; concurrency and logging support particular guarantees. An application can still issue an unauthorized but syntactically correct query. Authentication and entity/action authorization belong at the relevant trusted boundary, not in a model's promise to be careful.

Follow a source through relational, document and analytical forms

An authoritative document revision may be stored as an object with metadata, indexed relationally for entitlement and validity, transformed into text chunks, embedded in a similarity index, summarized and cached. These are different representations of related facts, not six new authorities. Each requires a source/revision relationship, access rule, transform version and freshness policy. A permission grant on the source must constrain derived excerpts and cached content before use; a filter on the final screen cannot undo an earlier context disclosure.

Treat a key as a claim about identity under a domain rule. If a document can have several revisions, the document identity alone does not identify the exact content evaluated. If a permission changes, a cache keyed only by document name may be insufficient. Define a cache contract including relevant caller/scope, source revision, policy version and decision time or expiry. Revocation and invalidation need actual behavior under delay and failure. Hashing the key does not establish who is allowed to read its value.

The complete relational studios below derive keys, dependencies, normal forms, executable constraints, grouping, NULL and window semantics. The storage-choice studio then compares nested documents, object/XML, key-value, graph, cloud/cache and distributed consistency contracts. The control/analytical studio covers transactions, security, warehouse/lake/BI, lineage and recovery. The final studio supplies learning-data, leakage, model metrics, informatics and maintained software evidence. These are substantive methods with worked and changed-fact models, included in full; an outside chapter is not needed to fill a missing definition.

Worked evidence chain: a current answer and its historical record

Use the existing A1/A2/B1 case as stipulated. An application first verifies the caller and requested purpose, then filters by permitted client/object and the current validity rule. Only then does it retrieve approved text for the current answer. The stored record identifies A2's revision, the policy and the as-of time. A2 can remain a permitted source while containing a misleading or malicious sentence; permission and factual reliability are separate checks.

Changed fact: A2 is revoked after the answer is generated but before a proposed export. The generated text is not a permanent permission token. Recheck the relevant action authority and derived-content rule, block an unpermitted new disclosure and preserve an appropriately limited audit record of the earlier event. Whether an authorized historical reviewer may inspect an old record is a separately defined purpose and retention/access decision. Do not infer either unrestricted history access or mandatory deletion from the existence of revocation alone.

Quality has several dimensions. A date can be syntactically valid but stale; an amount can be complete but use the wrong currency; a reference can exist but name the wrong entity; a summary can cite a real source that does not support the claim. Choose controls for the failure: type/domain validation, referential integrity, keyed reconciliation, time/scope checks, source inspection and a documented resolution queue. A single quality score cannot replace the actual error categories and owners.

Complete optional model and unit assessment

Data-boundary model: a derived answer cannot widen access

For the original current 12:00 query, A2 is the only permitted current source; A1 is expired and B1 is out of client scope. A historical query changes the time contract but not the need for permission. Carry source and policy versions through chunks, embeddings, summaries, caches and exports. Changed fact: the search index still contains revoked A2 and ranks it first. The trusted permission boundary must exclude it before context disclosure or block the affected operation if current entitlement cannot be established. A generated refusal after unrestricted retrieval is too late to prove no disclosure. A retained earlier audit record needs its own limited access and purpose rather than a blanket permission for future export.

Assess five dimensions at 0–4 points each: lifecycle/ownership/metadata; logical model and relational operations; representation/warehouse/learning-data distinctions; authorization/quality/recovery evidence; and a material changed-fact revision, for 20 points. Zero is absent, one supplies labels without usable reasoning, two omits a consequential boundary, three is accurate and reproducible within scope, and four additionally challenges a serious assumption and revises the decision. The following complete method studios provide fifteen further optional models and their practice rubrics. Passing arithmetic or SQL does not establish legal compliance, independent academic assurance or observed learner competence.

Included original Academy method studios

The five complete original studios follow with independent-case boundaries and their historical source/runtime provenance. A historical statement that a source was read is retained as history, not represented as a fresh verification of every link today. All source links are optional; all required teaching is on this page and the other current on-site studios.

From a business model to an enforced relational schema

What a relational database represents

A relation has named attributes and rows representing facts at a declared grain. Mathematical relations are sets; practical SQL query results can contain duplicate rows unless constraints or query operations remove them. That difference matters when counting events. A domain describes permitted attribute values and meanings. An identifier determines a row within its scope; an invoice number unique only within a company needs the company in its key or a separate globally unique internal identity. A field called id does not establish either uniqueness or business authority by itself.

Distinguish the schema, the definitions and constraints, from an instance, the current stored data. A schema can allow many valid future states beyond today's three observations. A functional dependency X→Y says two valid rows agreeing on X must agree on Y. It is a domain rule, not a correlation inferred from a tiny export. A candidate key is a minimal set determining the row. A primary key selects one candidate for ordinary reference, while other genuine candidate keys need their own constraints. Adding a surrogate key does not automatically prevent duplicate business events.

The DBMS catalog stores structural metadata; the business dictionary supplies units, grain, status definitions, time basis, owner and correction rules. A logical model must also specify optional and mandatory relationships. Views can present a derived subset without duplicating all base facts; whether a view can be updated is engine- and query-dependent. A view is not automatically a permission boundary, immutable historical snapshot or materialized copy. A DBMS may provide users and role grants; an embedded SQLite file instead relies heavily on application and operating-system access controls. Name the actual enforcement layer.

Derive a normalized design

Use an independent export Enrollment(student_code, student_name, course_code, course_title, mentor_code, mentor_name, grade), with one row per student-course enrollment. This is a fictional example, not Academy learner data. Suppose student_code→student_name, course_code→course_title and mentor_code, mentor_code→mentor_name, and the pair(student_code,course_code)→grade. The pair is the enrollment key under these rules. A grade is not determined by student alone or course alone.

First normal form requires one value from the chosen domain at each attribute position rather than an uncontrolled comma-separated list of course codes. What counts as an atomic domain depends on the declared operations: an address can be stored as one display value if it is never decomposed, but region-level querying may require separate fields with explicit rules. Second normal form removes non-key attributes depending on only part of a composite candidate key. Move student_name to Students and course_title/mentor_code to Courses. Third normal form addresses transitive non-key dependencies: mentor_name belongs in Mentors, linked by mentor_code, rather than repeated on every course.

This yields Students(student_code,name), Mentors(mentor_code,name), Courses(course_code,title,mentor_code), and Enrollments(student_code,course_code,grade). Enforce the keys and appropriate references. A join reconstructs the intended facts only when keys and references preserve the stated cardinalities. A decomposition should be lossless with respect to the modeled original facts; dependency preservation means relevant rules remain enforceable without recombining everything. Those are distinct goals. Boyce–Codd normal form strengthens determinant requirements: every nontrivial functional dependency has a superkey determinant. Some designs require tradeoffs between dependency preservation and stronger normal forms. Normalization is reasoning about dependencies, not a contest to create more tables.

Worked reconstruction and update anomalies

Take rows(S 1,Ana,C 1,SQL,M 1,Lee,80),(S 2,Bo,C 1,SQL,M 1,Lee,90),(S 1,Ana,C 2,Models,M 1,Lee,70). The original has three enrollments, two students, two courses and one mentor. The sum of the three grades is 240 and their simple enrollment-weighted mean 80. The student-level means are 75 for S 1 and 90 for S 2; their equally weighted mean 82.5 answers a different question. Normalizing must retain all three keyed enrollments and their grades, not just the grand mean.

Changing mentor M 1's current name requires one Mentors update instead of three export updates. A new course can exist before any enrollment, solving an insertion anomaly. Deleting S 2's enrollment does not erase the course or mentor. But if a certificate must preserve the mentor name printed when issued, a current-name join is insufficient; add the appropriate historical snapshot or version relationship. This is the same semantic distinction as the preserved order-line transaction-price example: normalization of current master data cannot rewrite historical facts.

Make the constraints executable

In the stated SQLite dialect, the following disposable schema expresses required identities and bounded grades. Execute it only in an isolated synthetic database for study; it is not a migration for this site.

PRAGMA foreign_keys = ON;
CREATE TABLE students(
 student_code TEXT PRIMARY KEY NOT NULL,
 name TEXT NOT NULL
);
CREATE TABLE mentors(
 mentor_code TEXT PRIMARY KEY NOT NULL,
 name TEXT NOT NULL
);
CREATE TABLE courses(
 course_code TEXT PRIMARY KEY NOT NULL,
 title TEXT NOT NULL,
 mentor_code TEXT NOT NULL REFERENCES mentors(mentor_code)
);
CREATE TABLE enrollments(
 student_code TEXT NOT NULL REFERENCES students(student_code),
 course_code TEXT NOT NULL REFERENCES courses(course_code),
 grade INTEGER CHECK(grade BETWEEN 0 AND 100),
 PRIMARY KEY(student_code,course_code)
);

SQLite has historical primary-key nullability exceptions, so the explicit NOT NULL text keys are intentional. A CHECK evaluating NULL is not a substitute for NOT NULL; the nullable grade here means a grade may not yet be known. Ordinary SQLite type affinity is not rigid type enforcement. A declared INTEGER may need a STRICT-table or explicit typeof/domain policy if storage class must be constrained. An integer-cent convention does not alone prove every inserted amount is an integer. Check the actual engine/version and required domain, including rounding and currency, before treating a declaration as a complete rule.

Enable foreign keys before the transaction and verify the actual connection setting. A foreign key rejects an invalid non-null parent reference when enforced; a separate NOT NULL enforces presence. It cannot prove that the referenced student or customer is the correct real-world entity. Do not use cascading deletion by convenience where historical records must survive. The preserved foreign-key application demonstrates deferred constraints, legacy violations and failed commit handling in detail and remains part of the teaching.

Changing data without changing the question

INSERT creates rows, UPDATE changes selected attributes, and DELETE removes eligible rows under the schema's rules. A missing WHERE on an UPDATE can change every row. Use a transaction, inspect the intended key set, parameterize values and verify exact postconditions. Placeholders bind data, not arbitrary table names or sort expressions; allowlist identifiers when needed. A transaction does not grant authority to update a record. A reusable application must authenticate the caller and authorize the specific entity on the trusted server boundary independently of SQL syntax safety.

For schema evolution, inventory views, triggers, indexes and foreign-key dependents; prove exact keyed facts survive rather than comparing only count and sum. A failed SQL statement may leave an active transaction whose earlier changes still need rollback. The existing migration case proves these failure paths for its isolated fixture. No part of this written exercise authorizes production deletion or alteration.

Optional progressive practice

Guided model: identify the real key

The enrollment key is(student_code,course_code), not student name or grade. S 1 can enroll in both C 1 and C 2, while C 1 has S 1 and S 2. Changed fact: repeat enrollment attempts must be retained. The original pair no longer identifies an attempt; introduce an attempt identity or a justified additional key component, and specify which attempt a report uses. Do not overwrite the prior grade merely to maintain the old key.

Independent model: reconcile after decomposition

Retain the three pairs(S 1,C 1)=80,(S 2,C 1)=90,(S 1,C 2)=70. Their total 240 and enrollment mean 80 are useful checks, but compare every keyed row and uniqueness as well. Changed fact: grades become 85,85,70. Count 3 and total 240 remain while two original facts change. A totals-only migration test would miss the corruption.

Transfer model: required grade or unknown grade

The nullable grade with a range CHECK admits an as-yet unknown grade. If the business transition to finalized requires a grade, enforce that transition rule at the appropriate trusted layer or revise the schema. Changed fact: every saved enrollment must already be graded. Add NOT NULL as part of a reviewed migration that handles existing unknown values explicitly, rather than silently replacing them with zero. Zero is a known outcome, not a missingness code.

Unit rubric: 20 points

Four points each for grain/candidate keys and dependencies; justified normalization and historical boundaries; enforced dialect-specific domains/references; exact reconstruction and migration failure tests; and changed-fact/authority reasoning. Complete model gives four relations with three preserved enrollments, total 240, mean 80 and distinct student-weighted 82.5, while retaining unknown grade semantics and rejecting unsafe identity or deletion shortcuts.

Optional source summary: SQLite CREATE TABLE was read for primary keys, nullability, type affinity and constraint behavior. This studio's schema and enrollment reconstruction are original. The existing detailed foreign-key and normalization applications are retained; publisher and official links are optional provenance, and no real learner table is accessed.

Construct, explain and test a SQL result

Relational operations and SQL's practical differences

Selection chooses eligible rows, projection chooses attributes, a join matches relations, and grouping changes the result grain. SQL often retains duplicate result rows, so SELECT DISTINCT is a separate operation. UNION combines result sets and removes duplicate rows; UNION ALL preserves all rows. Neither knows which repeated-looking records are distinct business events. Use event identities and a declared duplicate policy. INTERSECT and EXCEPT can test set membership, but set equality alone cannot establish duplicate multiplicities.

A useful logical SELECT order is FROM/joins, WHERE, GROUP BY, HAVING, result expressions, DISTINCT and ORDER BY. Windows operate on the rows remaining after the relevant grouping/filtering stage. This is a semantic reasoning order; an optimizer can choose a different physical access plan while preserving results. A sorted input file does not guarantee query output order. Supply ORDER BY with a stable tie-breaker when reproducibility depends on sequence. LIMIT without a defined order is not a meaningful rule for choosing the highest-value records.

An original six-event ledger

Use events(id,account,day,status,amount_cents): E 1,A,2026-01-01,settled,1000; E 2,A,2026-01-31,settled,2000; E 3,A,2026-02-01,settled,500; E 4,B,2026-01-15,pending,3000; E 5,B,2026-01-20,settled,NULL; E 6,C,2026-01-21,settled,0. Each id is one actual synthetic event. NULL means amount unresolved, and 0 is a measured zero. The January settled population contains E 1,E 2,E 5,E 6, not the February receipt or the pending event. It has four events, three known amounts and a known subtotal 3000, while its complete amount remains unknown.

SELECT account,
 COUNT(*) AS event_count,
 COUNT(amount_cents) AS known_count,
 SUM(CASE WHEN amount_cents IS NULL THEN 1 ELSE 0 END) AS unknown_count,
 SUM(amount_cents) AS known_subtotal
FROM events
WHERE day >= '2026-01-01' AND day < '2026-02-01'
 AND status = 'settled'
GROUP BY account
ORDER BY account;

The rows are A:(2,2,0,3000), B:(1,0,1,NULL), C:(1,1,0,0). B is incomplete; C has a known zero. Replacing both with the same display zero would conceal their difference. The mean known settled January event amount is 1000 from(1000,2000,0), not 750 obtained by treating the unknown fourth event as zero. The mean over just A's two known events is 1500. Every denominator must identify its population.

WHERE filters events before groups form. Adding HAVING COUNT(*)>=2 keeps only A. Adding WHERE amount_cents>0 instead excludes the known-zero C and unknown B before grouping, changing the target rather than just its presentation. CASE can classify rows or implement conditional aggregates; make unmatched cases explicit. A CASE expression that returns NULL can intentionally leave an observation out of SUM/AVG, but cannot establish that the excluded population is irrelevant.

NULL and predicates require three-valued reasoning

For a missing amount, amount_cents=0 and amount_cents<>0 are both UNKNOWN, so WHERE keeps neither. IS NULL detects missingness. NOT(UNKNOWN) remains UNKNOWN. TRUE OR UNKNOWN is TRUE, while FALSE OR UNKNOWN is UNKNOWN. Parentheses clarify combinations of AND and OR; do not let precedence choose eligibility by accident. A customer with a NULL identifier and a customer numbered 0 are different states.

For an exclusion subquery containing a key and NULL, NOT IN may return no otherwise unlisted rows because absence cannot be established under its truth conditions. Correlated NOT EXISTS asks whether an equal qualifying row exists and can express the intended anti-join. The preserved four-customer case gives complete counterexamples. If NULL means the exclusion file is untrusted rather than merely an absent key, stop or flag the report under that policy; changing syntax alone does not resolve input reliability.

Subqueries, CTEs and membership

A scalar subquery should return the single quantity the query expects; more than one candidate row may behave differently by engine, so enforce cardinality rather than relying on a permissive choice. A correlated subquery refers to the outer row, such as EXISTS a settled event for that account. EXISTS tests membership without multiplying account rows by matching events. A common table expression names a relation for clarity; it is not inherently a cached temporary table or a correctness guarantee. State its grain and verify it.

To report accounts with at least 3000 known settled January cents, aggregate the explicit eligible events in a CTE and join or filter the one-row-per-account result. To report every account, begin from the complete account relation and LEFT JOIN the aggregate. Distinguish no matching event from a matching event with unknown amount by retaining counts. If business eligibility requires complete measures, impose unknown_count=0 explicitly; a known subtotal above a threshold is not necessarily the same rule as a complete balance above it.

Window calculations preserve rows

For A's complete history, ordering by(day,id) with ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW gives running totals 1000,3000,3500. A January-only window ends 3000; a February display of the lifetime window should show 3500. Filter the display after computing the required history, not before. The original representative ledger additionally demonstrates same-date peers and default frame behavior. A deterministic identifier can resolve tied rows while still differing from effective business order; define which order the metric needs.

WITH history AS (
 SELECT id,account,day,amount_cents,
  SUM(amount_cents) OVER (
   PARTITION BY account ORDER BY day,id
   ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
  ) AS running_known
 FROM events WHERE status='settled'
)
SELECT * FROM history
WHERE account='A' AND day >= '2026-02-01'
ORDER BY day,id;

This returns E 3 with running_known 3500. A window that ignores NULL amounts still computes only a known subtotal when history is incomplete. Carry unknown-history counts for a trustworthy full balance. ROW_NUMBER assigns a sequence; RANK allows gaps after ties; DENSE_RANK does not. To choose the latest event per account, order by an appropriate timestamp and a unique tie-breaker, then filter row_number=1 in an outer query. It does not authorize discarding earlier events from storage.

Optional progressive practice

Guided model: a known zero and an unknown amount

January settled events are E 1,E 2,E 5,E 6, count 4. Known count 3, unknown count 1, known subtotal 3000. B has no known sum while C has known zero. Changed fact: E 5 is verified as 400 cents. The subtotal becomes 3400, known count 4 and unknown count 0; the full mean is 850. Preserve evidence for the correction rather than treating 400 as originally known.

Independent model: group eligibility

HAVING COUNT(*)>=2 after the stated settled January WHERE retains A only. If the question instead includes pending events, B has two January events but one unresolved amount. Changed fact: the manager asks for every account, including no events. Start from the account register and left join the aggregate. An event-only query cannot invent absent account rows.

Transfer model: a February screen

Compute A's settled history first to obtain 1000,3000,3500, then display February E 3 with 3500. Changed fact: the measure is February-only receipts. Filtering before aggregation is then correct and gives 500. Both numbers can be correct; the dashboard must name which contract it implements.

Unit rubric: 20 points

Four points each for population/logical operations; executable filtering/grouping and NULL reasoning; correct event-versus-account denominators; CTE/window ordering and display boundaries; and changed-fact validation. Complete model gives A 3000,Bincomplete,C 0 for January, correctly distinguishes the pending and February records, and explains both 3500 lifetime and 500 period-only February figures. No practice query is directed at production or learner records.

Optional source summary: SQLite SELECT was read for row filtering, grouping, duplicate handling and compound results. Its specified behavior supports the dialect examples; the six-event ledger, calculations and complete models are original.

Join at a declared grain and choose a storage model for its workload

Derive fan-out instead of treating it as a mysterious SQL defect

An inner join returns every matching pair. If one parent has m eligible lines and n eligible payments, their independent child joins can produce m*n combinations. Each line amount appears n times, each payment amount m times. Keys and foreign keys may all be valid while the sums are wrong. Preserve the existing job 101 case: billed 250,paid 100,open 150 become false 500,200,300 after a two-line/two-payment raw join. The repair is not to divide by two, because different parents have different multiplicities. Aggregate each fact to the agreed parent grain before combining it.

For a new independent fixture, order Q has two line records worth 1000 and 2000 cents, three distinct payments of 500 each, and no refund. The raw line-payment join has six rows. Billed sum 9000 repeats each line three times, while paid sum 3000 repeats each payment twice. Correct billed 3000,paid 1500,open 1500 come from separate aggregates. SUM(DISTINCT payment amount) would instead return 500, deleting two legitimate equal payments. Event identity, not value equality, defines whether an event is repeated.

WITH line_totals AS (
 SELECT order_id,SUM(amount_cents) billed
 FROM order_lines GROUP BY order_id
), paid_totals AS (
 SELECT order_id,SUM(amount_cents) paid
 FROM payments WHERE status='settled' GROUP BY order_id
)
SELECT o.order_id,COALESCE(l.billed,0) billed,
 COALESCE(p.paid,0) paid,
 COALESCE(l.billed,0)-COALESCE(p.paid,0) open
FROM orders o
LEFT JOIN line_totals l ON l.order_id=o.order_id
LEFT JOIN paid_totals p ON p.order_id=o.order_id
ORDER BY o.order_id;

The zero-fill convention assumes an absent child aggregate means no recorded events in a complete feed. It does not turn an unknown amount into zero. Keep original population and missingness checks. A customer-status predicate in WHERE after an outer join can remove unmatched accounts; put the eligibility predicate in ON or prefilter the child when the intended target retains every parent. To ask only whether a tag exists, use EXISTS rather than joining every tag and multiplying an order's money. For a tag-level report, intentional repetition requires a declared allocation/counting policy.

Relationships change across time and organizational scope

Joining invoice_no alone is unsafe when it is unique only within company. Match the complete key(company_id,invoice_no), or an equivalent globally unique internal identifier. Joining current territory to historical orders answers current-attribution, not order-date-attribution. The preserved temporal case gives North 100/South 500 under half-open historical intervals and exposes double total 1200 under overlaps. An ordinary primary key on interval start cannot enforce nonoverlap. Check cardinality per event, not just the final total; a valid-looking 600 can still be assigned to the wrong territory.

Relational storage is one representation, not a universal physical layout

The earlier course assigned nonrelational concepts externally. Those concepts belong on site too. A hierarchical model arranges records in a parent-child tree. It naturally represents a catalog with nested parts when a child has one structural parent, but shared children need references or duplication. Older network models allow records to participate through multiple links; navigating pointer paths differs from declaring a relational result. Neither label establishes current suitability or speed. Ask what relationships must be traversed, changed atomically and audited.

A non-first-normal-form or nested representation permits collection-valued attributes, such as an order containing an array of lines. A document database commonly stores self-contained structured documents, often with nested objects and arrays. An order document can preserve the exact issued line-price snapshot, but embedding a mutable customer contact in a thousand orders creates a propagation policy: should old documents retain the issuance contact or follow the current contact? That is a semantic choice, not automatically a defect or advantage. Schema flexibility does not remove a schema; it moves part of its validation into conventions and application controls.

An object database persists objects, identity and relationships directly, sometimes supporting inheritance and methods under its model. Object-relational extensions add richer types and collections to relational systems. Object persistence avoids rebuilding an object graph manually, but does not establish that a serialized object remains compatible with future code or has correct transaction boundaries. Distinguish identity from equality: two equal-address objects may represent different entities; one enduring entity may change attributes. Mapping a relational system to application objects through an ORM also does not eliminate joins, fan-out, transactions or query-cost inspection.

XML represents ordered trees with elements, attributes and potentially mixed content. A document-oriented XML store may query tree paths and preserve document structure. Relational storage can also retain XML or JSON values with engine-specific operators. If a legal or historical document's order and markup are meaningful, flattening every element into an unordered relation can lose context unless the mapping preserves it. Conversely, storing all operational events as opaque documents can make cross-document constraints and reconciled reporting harder. Choose by the facts and operations, not by whether a format looks modern.

NoSQL families and distributed guarantees

A key-value store maps a key to a value and suits direct retrieval when the application knows the key; secondary search and multi-key constraints depend on its features. A document store indexes fields inside documents and supports nested business aggregates. A wide-column family model organizes flexible rows/column groups for defined access patterns; it is different from analytical columnar physical storage, which groups values by column for scans and compression. A graph model treats vertices and edges as first-class structures, useful for path and relationship queries. A fraud-network question can fit a graph while the authoritative payment ledger remains relational.

Replication copies data across nodes for availability or read scale; partitioning divides data across nodes. Neither automatically ensures a single up-to-date global result. Strong consistency and eventual convergence are different contracts. During a network partition, a distributed design may restrict availability to preserve particular consistency guarantees or accept operations whose conflicts need later resolution. The familiar CAP discussion concerns specific consistency and availability definitions under partitions, not an all-purpose instruction to choose any two desirable properties. Inspect the actual product, transaction scope, read/write settings, failure behavior and reconciliation policy.

Cloud-managed storage changes who operates infrastructure, not who owns the data definition or access policy. A managed database, object store, warehouse and serverless query service offer different execution and transaction models. Storage cost, requests, scans, egress, backups and monitoring all affect total cost. Encryption, identity, region, retention and recovery settings need explicit responsibility assignments. Moving to a service does not make a broken event identifier unique or prove a recovery copy is restorable.

Worked choice: one order in three representations

Represent order Q with line IDs L 1=1000 and L 2=2000, payment IDs P 1=P 2=P 3=500, and a customer reference. In normalized tables, query separate child aggregates. In a document, sum distinct keyed line entries and payment entries within the document; reject duplicate event IDs under its update contract. In a key-value cache, store a derived summary(billed 3000,paid 1500) with source version and expiration/rebuild policy. The cache is not a new authoritative payment history. If P 4=500 arrives, correct paid 2000/open 1000 and invalidate or update every affected representation under a declared consistency strategy.

For a cache lagging one update, the displayed paid 1500/open 1500 may be internally consistent with an older version while stale for current operations. Label the version/cutoff; do not merge the new payment count with the old amount and call it one state. If the business requires current credit-limit enforcement, a stale analytical cache is the wrong authority. A system can intentionally use multiple storage models, provided lineage, authority and failure recovery are clear.

Optional progressive practice

Guided model: reconstruct the multiplication

Two lines and three payments produce six joined pairs. Billed 9000 and paid 3000 are inflated; independent aggregates give 3000 and 1500. Changed fact: order R has one line and one payment. Its raw join is not inflated, so dividing every order's totals by a common factor corrupts R. Correct grain rather than a guessed multiplier.

Independent model: historical document or current master

An issued order document retains the agreed line prices and issuance contact; a current customer record supplies today's contact. Both can coexist with explicit meaning. Changed fact: the report promises the address known at issuance but joins only today's master. Add a preserved snapshot/history relationship and test it; changing from relational to document storage alone does not recover lost history.

Transfer model: cache authority

After P 4=500, the authoritative paid amount is 2000 and open 1000. An old cache still shows 1500 and 1500. Mark it stale and rebuild/update under the declared contract; do not use it to authorize another payment or credit decision that needs current state. Changed fact: it is an intentionally frozen prior-day dashboard. Its old value can be valid for that snapshot if clearly labeled and fully consistent with the preserved prior-day inputs.

Unit rubric: 20 points

Four points each for exact join/grain repair; scoped and temporal keys; comparison of relational/nested/object/XML/NoSQL representations; consistency/cloud/cache responsibilities; and changed-fact model selection. Complete model gives Q 3000/1500/1500, preserves equal-valued payment identities and explains document snapshots versus current masters without promising universal database superiority.

Optional source summary: OpenStax nonrelational systems was read for the range of hierarchical, nested, object, XML and nonrelational representations. The on-site explanations and Q-order comparison are original. SQLite SELECT was read for the stated relational join/filtering semantics; its dialect is distinguished from distributed product guarantees.

Transactions, secure stewardship and an auditable analytical store

Connect an invariant to a transaction boundary

Atomicity makes the effects inside a transaction succeed or fail together. Consistency concerns preservation of declared constraints and application invariants. Isolation defines interactions among concurrent transactions. Durability concerns persistence after commit within the actual system guarantees. These properties do not establish that the business operation is correct or authorized. An atomic wrong refund is still wrong. The preserved refund case protects a cross-row total, checks replay identity and tests audit failure rather than merely catching an exception.

In SQLite, BEGIN DEFERRED starts an explicit transaction whose write lock may be needed later; BEGIN IMMEDIATE attempts a write transaction at the start. Multiple readers can coexist with one writer. A busy result is a real outcome that a bounded retry policy must handle. BEGIN statements do not nest; use SAVEPOINT and RELEASE or ROLLBACK TO for controlled partial units. Ending a savepoint is not necessarily committing the outer transaction. Other engines and isolation levels differ; do not transplant these details as universal SQL behavior.

A failed statement does not always roll back all prior work. On any operation failure, determine transaction state and execute the intended rollback or justified repair. If a client loses the response after commit, a new command ID can duplicate the effect. Reuse the original operation identity and compare canonical contents with the established result. If the same ID arrives with a changed amount, report a conflict rather than a replay. Keep command, effect and required audit entry in one atomic boundary. External email or a remote payment provider is normally outside that database transaction; a durable outbox and idempotent downstream delivery can coordinate it, but cannot promise literal exactly-once delivery across arbitrary failures.

Worked capacity and outbox record

Use a separate synthetic account with eligible credits 12000 cents and debits 2000. Available capacity 10000. Two new debit requests of 6000 each must not both be approved against the same initial 10000. After the first valid commit, available 4000 and the second 6000 must fail. If its effect is inserted and the audit entry deliberately fails, rollback must leave debit total 2000 and capacity 10000 for the original state. An identical retry after a successful first commit leaves debit total 8000 and capacity 4000, not 14000 andminus 2000.

Suppose a committed operation also creates outbox message M 1. A delivery worker can send M 1 and crash before recording its acknowledgment. On retry the recipient may receive it again. Preserve a stable message ID and a receiver-side deduplication or harmless replay policy where possible; record delivery attempts and reconcile uncertain outcomes. A report that counts delivery attempts as distinct business debits mixes two event grains. The database transaction should make the business event and pending message durable together, while the delivery contract states its own guarantees.

Security is a set of boundaries and evidence

Confidentiality limits disclosure, integrity protects authorized correctness and availability supports needed access. Authentication establishes an identity, authorization grants permitted actions and auditing records meaningful activity. Grant least privilege for actual duties; a reporting identity should not need unrestricted update authority. Check account/tenant ownership on the trusted server, not only in a filtered browser table. Parameterized SQL separates values from syntax but does not authorize reading another tenant's valid order ID. Avoid logging unnecessary secrets or personal values; logs themselves need controlled access and retention.

Threat modeling starts with assets, actors, entry points and trust boundaries. For a receipt service, threats include forged event identities, unauthorized account access, malicious import text, tampered amounts, credential theft, deleted backups and denial of service. Match each to a control and a test: uniqueness and payload comparison, server-side ownership checks, binding parameters, validated integer/currency domains, protected credentials, isolated recoverable copies and capacity/incident procedures. Encryption in transit protects a connection against relevant interception; encryption at rest protects certain storage exposures. Neither makes an authorized but excessive export appropriate, and keys need their own access and recovery controls.

A practical risk register records scenario, likelihood reasoning, consequence, existing controls, residual risk, accountable owner and next action. Numerical risk scores can help order discussion but should not imply precision unsupported by evidence. A fictional loss estimate 10000 with annual probability.02 gives expected loss 200; a control costing 150 that halves the probability yields expected reduction 100, so expected-value arithmetic alone would not justify it. A mandatory control, severe tail exposure, uncertainty or strategic dependency can still change the decision. State that reason instead of presenting a subjective score as a measured law.

NIST's current Cybersecurity Framework organizes outcomes into Govern, Identify, Protect, Detect, Respond and Recover. Governance sets responsibilities and risk tolerance; identification inventories assets and exposures; protection implements safeguards; detection recognizes events; response contains and investigates them; recovery restores service and learns. A profile describes current and target outcomes, not a certificate that every system is secure. A small database project can map concrete evidence to these functions without claiming compliance or professional approval. This course supplies conceptual and synthetic methods, not a security certification.

Layer safeguards around the actual workflow

A firewall or network segmentation rule limits permitted paths; it does not determine whether a user may refund a particular order. Multi-factor authentication reduces some credential risks but cannot repair a service that trusts a caller-supplied account ID. Patch management addresses known defects under a tested rollout and recovery plan. Malware protection, protected backups and restricted service identities reduce different parts of a ransomware scenario. A phishing-resistant login and staff reporting process can complement technical controls against social engineering. Treat zero trust as continuously justified access to resources rather than a product name that makes internal networks safe by declaration.

Protect secrets outside source code and logs, rotate/revoke them under controlled procedures and test that permissions remain least-privilege. Hashing is not encryption: a one-way digest can help compare integrity or support a properly designed password-storage scheme, while encryption permits recovery with a key. A plain fast hash of a predictable identifier does not anonymize it against enumeration. Pseudonymized records may remain linkable through other fields. Data minimization, purpose limitation and reidentification risk belong in design even when an analytical model never displays names.

Security governance connects policy, standards, procedures and evidence. A policy states required outcomes and authority; a standard defines an enforceable baseline; a procedure describes the actual steps; an audit or review tests evidence against the stated scope. Assign owners for exceptions and time-bounded remediation. Staff, suppliers and managed providers have different responsibilities. A provider's claim about its infrastructure does not establish that this application's public links, permissions or export behavior are correct. Compliance requirements and actual threat reduction overlap but are not identical; report the specific evidence rather than advertising universal compliance.

Recovery must be demonstrated

Recovery point objective(RPO) expresses tolerable lost history; recovery time objective(RTO) expresses tolerable service restoration delay. These are business requirements, not what a backup button guarantees. If the last recoverable snapshot was 06:00 and failure 10:00, up to four hours of later data may be absent without logs or other recovery. Restoring in 30 minutes meets a two-hourRTO but does not meet a one-hourRPO. Test restoration in isolation, verify exact event identities and constraints, and ensure recoverable credentials/configuration as well as data. Transaction rollback, replication and backup solve different problems; a replicated accidental deletion may spread promptly to every replica.

An incident procedure should name detection, containment authority, evidence preservation, communication, recovery validation and review. Do not improvise destructive cleanup while the cause and retained evidence are unknown. Specific notification duties and retention periods depend on applicable law and policy; this unit makes no invented legal deadline. Florida remains the default for contemporary state-law examples, with federal obligations and explicit comparisons separately identified.

From operational events to a warehouse

An operational database emphasizes correct individual transactions. A warehouse integrates curated historical facts for reporting and analysis. A fact table has a declared grain, such as one settled receipt event; dimensions supply descriptive context such as account, product and date. A star layout connects facts directly to dimensions; a snowflake normalizes some dimension hierarchies. Measures have additivity rules: receipt cents can be summed within one currency, account-balance snapshots cannot be summed across days as if they were flows, and rates usually require their numerator/denominator rather than an average of averages.

ETL extracts, transforms and loads; ELT loads into a controlled analytical environment before transformations. Either needs source boundaries, duplicate policy, lineage, quality checks and replay-safe incremental processing. A watermark based only on event time can miss late arrivals. Preserve ingestion time and event identity, allow a reviewed late-arrival/revision policy and compare source-to-target keyed records. Slowly changing dimensions can overwrite a current description or retain versions with valid intervals; choose according to whether reports need current or historical attribution. The original territory example remains the concrete counterexample to silently joining every old event to today's region.

A data mart focuses a governed subset on a department or decision area; it should not silently redefine shared revenue or customer identity. An operational data store integrates relatively current operational information for defined cross-system uses, while a historical warehouse supports a different time horizon. A virtual warehouse or data-federation layer can query remote sources without copying everything centrally. That can reduce duplication while introducing latency, source availability, permission and consistent-snapshot challenges. For example, joining a current receipt source with yesterday's refund source can produce a total that never existed together. Document refresh and snapshot boundaries whether the integration is materialized or virtual.

A data lake can retain raw or lightly processed structured, semi-structured and unstructured objects. Without cataloging, quality, access rules and discoverable lineage, retained objects become difficult to interpret. A lakehouse combines some lake-style storage with managed table/transaction/catalog capabilities, but its guarantees depend on the actual implementation. BI combines governed measures, queries and presentation to support decisions; an attractive dashboard is not a new source of truth. Show the source cutoff, measure definition, unresolved quality flags and drill-down lineage.

Worked warehouse reconciliation

For the independent receipt fixture fromunit 1, raw import rows total 31500 cents, unique events 24000, known-account allocations 20000 and unresolved 4000. A curated receipt fact should retain three distinct event identities and their valid amounts, including the unresolved assignment with an explicit status. The account reporting view can show 20000 assigned plus 4000 suspense. Dropping the unresolved event loses cash; loading every raw replay creates false cash. A daily balance fact would be a different grain and cannot be appended as though it were another receipt.

If a later 4000 allocation resolves suspense, receipt total stays 24000 while account attribution changes. Preserve a versioned correction or event relationship. If the warehouse refresh occurs after a cutoff, a prior published snapshot may remain a valid record of then-known information while a current corrected view differs. Label the distinction and reconcile both; do not overwrite history to hide changes.

Optional progressive practice

Guided model: a race and a failed audit

Credits 12000 minusdebits 2000 leave 10000. A first 6000 commit leaves 4000; the second 6000 must fail. If the first audit fails before commit, rollback restores 2000 debits/10000 capacity. Changed fact: the response is lost after commit. An identical operation retry must find the established 6000 event and leave 8000 totaldebits/4000 capacity, not create another effect.

Independent model: recovery targets

A 06:00 snapshot and 10:00 failure imply a four-hour exposure without later recoverable records. A 30 minute restore meetsRTO 2 hours but failsRPO 1 hour. Changed fact: tested transaction logs recover through 09:45. Potential history loss becomes 15 minutes, provided log completeness and restoration are actually verified. A claim that logs exist is weaker than a successful restoration test.

Transfer model: a warehouse is not a deduplication excuse

Retain three unique receipt events totaling 24000 and expose 4000 unassigned. Changed fact: an equal-valued fourth event has a distinct verified external identity. It must remain a separate fact; a DISTINCT amount rule would discard a legitimate receipt. Catalog the grain, idempotency key, late-arrival policy and source-to-target checks rather than trusting a grand total alone.

Unit rubric: 20 points

Four points each for transaction/invariant/retry boundaries; security roles, threat/control evidence and governance; RPO/RTO restoration reasoning; warehouse/lake/BI grain and lineage; and changed-fact reconciliation. Complete model preserves the 12000/2000 capacity state under failed audit, deduplicates exact commands only, gives the recovery limits and preserves 24000 unique receipts with 4000 suspense. No real financial or learner operation is performed.

Optional source summaries: SQLite transactions was read for explicit boundaries, savepoints and reader/writer behavior. NIST Cybersecurity Framework is optional primary provenance for organizing risk outcomes; the register and all financial/recovery scenarios here are original teaching. No framework use is presented as certification, legal compliance or a production security assessment.

Optional analytical-store provenance: OpenStax warehousing, lakes and BI was read to check the assigned scope, including marts, operational and virtual stores. All business scenarios and reconciliation methods here are original on-site teaching. The NIST CSF2.0 primary document confirms its six outcome functions and tailored profiles; use does not certify security.

Validate the report, the analytical dataset and the system that delivers them

A report is an executable chain of claims

Write the eligible population, output grain, measures, source cutoff, status policy, missingness policy and currency before optimizing a query. The preserved Cedar job report has three rows with billed 730,paid 390,open 340 dollars; its counterexamples expose fan-out and equal-priced legitimate lines. The separate preserved paid-order cumulative dossier has billed 6500,settled 6500,posted refunds 800 and net billed 5700 cents, excluding draft 700 and pending 500 under explicit policies. Do not combine those independent fixtures or call either a universal revenue-recognition rule.

Validation needs both totals and keyed facts. Check unique output keys, intended parent coverage, unmatched relationships, duplicate input identities, unknown amounts and boundary timestamps. Compare source-to-target facts in both directions and inspect multiplicity. A correct grand total can hide offsetting account errors. An optimization is acceptable only if the complete promised result remains unchanged; a changed execution plan is not a correctness proof. The preserved 10,000-event and WAL examples separate semantics, access strategy and snapshot visibility without promising universal speed.

Prepare data for learning without leaking the answer

Big-data problems concern volume, arrival speed, varied representations, reliability and practical usefulness, not a magic row-count threshold. A small sensitive dataset can be harder to govern than a large public one. Integration aligns identities, units and timing across sources; it must preserve uncertainty about unresolved matches. Batch pipelines process bounded groups, while streams process arriving events with policies for ordering, late data, replay and failure recovery. A streaming output is not automatically complete for an event-time period just because no new row arrived in the last minute.

Supervised learning uses labeled examples to predict a target; classification predicts categories or probabilities, regression predicts a quantitative outcome. Unsupervised methods, such as clustering, seek structure without the same provided outcome labels. A clustering label is not ground truth or a causal explanation. A shallow model may use explicit features and a relatively simple decision structure, such as linear/logistic models or trees. A deep neural model learns multiple layers of representation through fitted parameters; image, text and sequence applications may benefit when appropriate data and compute exist. Complexity does not remove the need for quality, an admissible target or honest validation.

Tools operate at different layers. SQL constructs eligible cohorts and features; Python/R libraries implement transformations and model estimation; distributed query engines or massively parallel processing(MPP) divide work across workers; deep-learning frameworks support tensor operations, automatic differentiation and accelerated training. Naming a tool does not make a result verified. MPP can distribute table partitions and partial aggregates, then combine results. Data skew, network shuffles, coordination and failure retries limit speedup. If 80%of a workload is parallelizable and four workers are otherwise ideal, Amdahl's simplified speedup is 1/(.2+.8/4)=2.5, not 4. That model omits real overhead and is an upper-bound reasoning exercise under its assumptions.

Feature construction needs a decision-time contract. To predict next-month late payment at month-end, a feature called eventual_collection_date contains future information and must not enter a historical forecast. Split by time and, where the target is new accounts, by account; repeated rows from the same entity can otherwise leak identity-specific patterns. Fit imputation, category encodings and scaling only within training. Preserve labels, feature definitions, source versions and the model version. Evaluate against a simple admissible baseline on the same targets, not against a deliberately weak comparator with less information.

Worked classification and changed threshold

Use a separate synthetic frozen holdout of 100 invoices:20 ultimatelylate and 80 on time. A fixed threshold flags 25:15 true late and 10 false alarms. The remaining 75 contain 5 missed late and 70 true negatives. Accuracy 85%,precision 15/25=60%,recall 15/20=75%,specificity 70/80=87.5%. A never-late baseline has 80%accuracy but zero recall. These are observed holdout proportions, not guaranteed population rates. Report the selection and threshold process, sample size and costs.

Suppose a missed late invoice costs 100 units and a false alarm costs 10. This threshold has loss 5*100+10*10=600. Another frozen threshold catches 18 of 20 late but falsely flags 25 of 80 on-time invoices, giving loss 2*100+25*10=450 and accuracy 73%. Lower accuracy can accompany lower declared loss. If costs become 20 for a miss and 20 for a false alarm, losses are 300 and 540, reversing the preference. Declare costs before choosing a winner, and retain an independent evaluation after threshold selection. If all thresholds were selected using this holdout, call it development evidence rather than untouched final testing.

Informatics connects users, workflow and information

Informatics examines how people and technical systems collect, interpret and use information in a domain. A correct query that staff cannot understand can produce unsafe workflow decisions; a helpful interface built on incomplete records can mislead just as seriously. For a collections screen, show the measure's unit, cutoff, unresolved amounts, evidence and authorized next action. Distinguish a model flag from a verified late payment, and give a way to inspect and correct source errors. The user's role, decision deadline and ability to contest a record are design inputs, not cosmetic additions after coding.

An information-system lifecycle includes understanding the problem and stakeholders, feasibility and requirements, design, implementation, validation, deployment, operation/change and eventual retirement or migration. A health, sports or financial application uses different domain vocabularies and consequences even if all store tables. Text instruction and synthetic tests do not establish clinical competency, regulatory approval or authority over real people. This course's examples support business-data reasoning; they do not make automated eligibility or care decisions.

Engineer a small reporting service as a maintained system

Software engineering applies organized design, construction, evaluation and maintenance to a useful system. Requirements include functional behavior(one row per eligible order, an authorized refund operation) and quality constraints(correctness, availability, security, accessibility, latency and recoverability). Make each testable. 'Fast and secure' is not an acceptance criterion. 'A reporting identity cannot update source orders' and 'the report retains accounts without payments and exposes unknown amounts' have observable consequences. Include data contracts, interfaces and external dependencies in the design.

A layered design can separate ingestion validation, persistence/transaction operations, report queries, service authorization and presentation. A repository abstraction can isolate data-access details, while an outbox pattern coordinates committed events with later message delivery. Patterns are reusable structures for recurring problems, not proof that every project needs a framework. Keep responsibilities clear enough to test failure boundaries. Refactoring changes internal structure while intending to preserve externally promised behavior; a change from current-price to historical-price reporting is a semantic correction and must be described as such, even if it accompanies refactoring.

Process choice depends on risk and feedback. A staged plan can make stable interfaces and formal approvals explicit; an iterative or agile process delivers small tested increments and revises requirements through feedback. Neither means skipping documentation, security or preservation. A risk-driven spiral emphasizes resolving major uncertainties through successive cycles. Prototypes can test workflow or feasibility but require a clear boundary before becoming relied-upon production systems. Source control, code review, automated builds, dependency tracking and issue histories provide traceability across methods. Continuous delivery prepares verified changes for release; it is not permission to deploy every experiment without the relevant authority.

Testing has complementary scopes. Unit tests check an isolated transformation; integration tests exercise actual interfaces/transactions; system tests verify the connected workflow; user acceptance assesses whether real users can accomplish the intended task. Static analysis and review inspect code without running it. Black-box tests focus on specified behavior; white-box tests consider implementation paths. Boundary, property-based and adversarial fixtures can expose errors that ordinary examples miss. Regression tests protect earlier promises. Code coverage records which code was exercised, not whether expectations were correct. Agent-run tests are not observed human learner or subject review.

Worked requirements-to-release ledger

For the preserved paid-order case, requirement R 1 is one row per paid order with billed 6500,settled 6500,refund 800 and net 5700; R 2 excludes draft 700 and pending 500 but keeps them in exception checks; R 3 applies refund command R 3=400 exactly once and rejects a changed payload; R 4 preserves orders, line prices and settled payments; R 5 exposes a consistent read cutoff. Test R 1 with independent event arithmetic and exact rows, R 2 with status boundaries, R 3 with replay/conflict/over-limit/failure injection, R 4 with before/after keyed comparisons and R 5 with the documented snapshot fixture.

A release ledger connects each requirement to design, test evidence, method/schema version, review status, rollback strategy and monitoring. A rollback to an old application may not undo a destructive schema migration; plan backward/forward compatibility and preserve recoverable data. A canary or limited rollout can reduce exposure while monitoring known invariants, but a passing small slice does not prove all workloads. Keep an incident and correction record. The actual Academy learner database is outside every laboratory in this course.

Reuse includes libraries, modules, services and tested domain components. Review license, provenance, version, maintenance, interfaces and security exposure before adoption. Free/open-source availability does not mean no obligations or no risk. A permissive library and a reciprocal license can impose different conditions; the concrete license text and intended distribution matter. This lesson makes no specific legal conclusion. Professional ethics includes accurate evidence claims, respect for privacy and accessibility, reporting known limits and avoiding deceptive metrics. AI-assisted generation can speed drafting or code suggestions, but output still requires source checking, tests and accountable review; a confident generated query can duplicate money.

Optional progressive practice

Guided model: test a learning-data claim

The first holdout hasTP 15,FP 10,FN 5,TN 70:accuracy 85%,precision 60%,recall 75%,specificity 87.5%. Declared miss 100/false-alarm 10 loss 600. Changed fact: the alternative frozen threshold givesTP 18,FP 25,FN 2,TN 55. Accuracy 73%butloss 450. Name the cost target and threshold-selection history rather than declaring the larger accuracy universally better.

Independent model: scale and leakage are distinct

The simplified 80%-parallel/four-worker speedup is 2.5. It says nothing about whether an eventual collection-date feature was available at issue time. Changed fact: a thousand workers make the leaked model run faster. The evidence remains invalid for the historical forecast; remove future information and reconstruct the admissible evaluation before interpreting speed or accuracy.

Transfer model: passing tests is not human acceptance

Exact SQL and transaction fixtures can establish their own stated results, while staff usability and independent academic review remain separate. Changed fact: a user observes that a zero and an unknown amount look identical. Treat that as a real presentation requirement defect, preserve the old evidence and revise display and tests. Do not call a new test a retroactive human review of all courses.

Unit rubric: 20 points

Four points each for exact report/lineage/snapshot validation; learning-data eligibility and threshold metrics; informatics and testable requirements; connected design/process/testing/release preservation; and ethical changed-fact reasoning. Complete model retains the original 6500/6500/800/5700 report, post-refund 1200/5300, all replay and historical-price boundaries, and separately calculates 85%/600 versus 73%/450 for the independent classifier. It declines both false software and false human-review claims.

Optional source summaries: OpenStax's learning-data section and informatics section were read for their data/pipeline and human-system scope. Its software fundamentals, process and testing/reuse/ethics topics informed the topic boundaries. The methods, classifier, requirements ledger and complete models above are original on-site teaching, not assigned external chapters or copied textbook prose.