Checking business-table joins: keys, cardinality and reconciliation Test business dataset joins with a runnable multiplication example, unmatched-key audit, temporal lookup rules and a reviewable acceptance report. A join-quality review asks whether records connect with the intended meaning and row counts. A successful SQL query or a high match rate is insufficient: duplicated lookup keys can multiply amounts, while inner joins can silently remove valid transactions. Establish the grain of each input, test key uniqueness, preserve unmatched cases and reconcile the resulting table before using it for training or analysis. Write the relationship before writing the query Start with a sentence such as “each order belongs to one customer record valid on its order date.” That sentence specifies more than two column names: it identifies the transaction unit, expected cardinality and historical lookup rule. If a row represents an order line rather than an order, document that difference before comparing totals. Ask whether identifiers are unique globally, within a company, or only within a source system. A composite key such as source_system plus customer_id may be necessary. Do not trim, case-fold or cast keys to numbers without recording the transformation: leading zeroes and case can be meaningful. The [W3C tabular-data model](https://www.w3.org/TR/tabular-data-model/) provides a vocabulary for table schemas and foreign-key relationships; an actual collection still needs its own field definitions. Worked example: a perfect match rate can inflate revenue The following SQLite example is deliberately defective. There are three orders and every order finds a customer. However, customer C1 occurs twice in the lookup table. Both of its orders are repeated in the joined output, so a 100% match rate accompanies an inflated monetary total. These are invented diagnostic rows, not operational Fiund data. WITH orders(order_id,customer_id,amount) AS ( VALUES ('O1','C1',100),('O2','C1',50),('O3','C2',80) ), customers(customer_id,region) AS ( VALUES ('C1','West'),('C1','East'),('C2','North') ) SELECT COUNT(*) AS joined_rows, SUM(o.amount) AS joined_amount FROM orders o LEFT JOIN customers c ON o.customer_id=c.customer_id; -- Expected: joined_rows=5, joined_amount=380. -- Original orders: 3 rows, total amount=230. Interpret the discrepancy before fixing it The output has five rows and a sum of 380 instead of three orders totaling 230. O1 contributes 200 rather than 100; O2 contributes 100 rather than 50; O3 remains 80. The difference is explained by cardinality, not a rounding error. SQLite’s [SELECT documentation](https://www.sqlite.org/lang_select.html) describes how matching input combinations form join results. Do not repair this result by applying DISTINCT to the final amount. Two genuine orders can share an amount, and duplicated customer rows may represent legitimate historical versions. Resolve the meaning of the right-side records first: reject unintended duplicate keys, choose a documented effective-date version, or keep the many-to-many relationship as a separate relation rather than flattening it. A minimum reconciliation report Run these checks on the proposed delivery and on relevant source slices. A single overall percentage can conceal one broken organization or month. Keep counts both before and after any documented exclusions. Check What to count What a failure may mean Lookup uniqueness Rows and distinct complete lookup keys Repeated entities, incomplete composite key or historical versions Unmatched transactions Left-side keys with no approved target Missing reference table, deleted records or incompatible snapshots Output grain Rows per original transaction identifier Multiplication, aggregation or lost transactions Control totals Amounts and distinct entities before and after Duplicated values, filtering or inconsistent units Null and malformed keys Missing, blank and invalid values separately Unknown identity or a parsing problem, not one generic missing bucket Keep unmatched rows visible Use a left-side reconciliation or a separate anti-join report when checking a source. An inner join answers a different question: it returns matched combinations and can make a defective delivery look clean by removing the evidence. Document the denominator for a match rate: transactions, distinct keys or monetary value lead to different interpretations. For example, three unmatched orders out of 1,000 may appear minor, but they could contain the only orders from a required market. Review unmatched records by source, period and business category, then assign an explanation such as intentionally excluded, unresolved reference, or source defect. Acceptance thresholds should follow the planned task and consequence of error; this guide does not prescribe a universal percentage. Historical joins need an event-time rule If a customer moved region in June, a March order should not automatically inherit the customer’s current address. Ask for valid-from and valid-to fields, whether intervals can overlap, and how open-ended intervals are encoded. Specify an inclusive/exclusive boundary convention and test transactions exactly on a change date. Also separate event time from the time a correction became available. A forecasting dataset may require what the organization knew on the decision date, rather than the corrected history visible today. Preserve the original transaction identifier and the selected lookup-version identifier so a reviewer can reconstruct the choice. What to include in a business-data sourcing brief Send a small relationship diagram, field dictionary, expected output grain and a few hand-checked examples. Add reconciliation queries, treatment of unresolved matches, the decision-time requirement and a source-level exception report. This gives a buyer a concrete acceptance artifact rather than a generic promise of “clean linked tables.” A useful pilot deliverable contains the source tables, documented transformations, joined result, diagnostic counts and a list of unresolved cases. Confirm which preparation work is in the quote. A provider’s ability to supply files does not establish that a particular join, historical lookup or commercial use has already been validated. Does a 100% key-match rate prove a join is correct? No. The example matches every order while multiplying two of them. Review uniqueness, cardinality, output grain and control totals alongside match rate. Should I remove duplicate keys automatically? Only after determining their meaning. Duplicate keys can be data defects, historical versions or evidence that the selected key is incomplete. An arbitrary keep-first rule can discard the correct record. What should a seller deliver when some relationships are unresolved? An explicit exception file with stable source identifiers, reason codes and the agreed handling rule. Leaving the uncertainty visible is more useful than silently dropping records. Research method: Fiund research desk; public sources, explicit worked-example labels and project-specific availability review. Editorial contact: hello@fiund.com. Sources Model for Tabular Data and Metadata on the Web: https://www.w3.org/TR/tabular-data-model/ SELECT: joins and matching input combinations: https://www.sqlite.org/lang_select.html