Duplicate Data
Duplicate data is more than one record representing the same real-world entity or event when exactly one record should exist — the same customer entered twice from two different signup forms, the same transaction logged twice due to a retry after a network timeout, the same survey response submitted twice by an impatient respondent who clicked submit a second time. Left unaddressed, duplicates inflate counts, distort averages toward whatever the duplicated records happen to represent, and — in the worst case — silently double a reported metric like revenue or user count without any error message signaling that something went wrong.
Duplicates split into exact and fuzzy, and the distinction determines how hard they are to find. Exact duplicates are rows identical across every field, trivially detected by grouping on the full row and counting occurrences, or in SQL by a GROUP BY across all columns with a HAVING COUNT greater than one. Fuzzy duplicates represent the same real-world entity but differ in some fields — "Jon Smith" at "123 Main St" and "Jonathan Smith" at "123 Main Street," or a product entered with slightly different capitalization or spacing — and finding these requires similarity-based matching rather than exact comparison, since no field matches character-for-character even though both records clearly describe the same person or product.
Common sources of duplicate data each have a distinct root cause worth diagnosing rather than treating duplicates as a single undifferentiated problem. Application-level retries — a user double-clicking a submit button, or a system automatically retrying a failed API call without checking whether the original request actually succeeded — create duplicates at the point of entry. Data integration introduces duplicates when the same entity exists independently in two source systems being merged (a customer who exists in both a CRM and an e-commerce platform, with no shared identifier connecting the two records until a matching step runs). ETL pipeline bugs — a scheduled job accidentally running twice, or a pipeline step re-processing already-processed records after a partial failure — create duplicates silently, at scale, without any obvious symptom in the data itself until a downstream aggregate looks suspiciously high.
Deciding how to resolve a confirmed duplicate pair — which record to keep, and how to merge information from both — is its own nontrivial step, because the two records often aren't identical even in their shared fields: one might have a more recent email address, the other a more complete purchase history. Survivorship rules (field-by-field logic for which value wins when records conflict — most recent update wins, most complete record wins, a manually specified priority source wins) formalize this decision so it's applied consistently across thousands of duplicate pairs rather than resolved ad hoc case by case, which matters because an inconsistent merge strategy produces an inconsistent final dataset even after deduplication is nominally complete.
Idempotency — designing a system so that processing the same input multiple times produces the same result as processing it once — is the preventive engineering discipline aimed at duplicates specifically, addressing the problem at its source rather than cleaning it up after the fact. An idempotent API endpoint, for instance, uses a unique request identifier to recognize and silently ignore a retried request rather than creating a second record; database-level unique constraints serve the same preventive purpose by rejecting an insert that would violate uniqueness outright. Preventing duplicates at the point of entry is generally cheaper and more reliable than detecting and merging them afterward, which is why idempotent design has become a standard practice in system architecture rather than something left entirely to downstream data cleaning.
Read duplicate data as a problem with a traceable origin, not just a symptom to clean up after the fact: exact duplicates are a detection problem, fuzzy duplicates are a similarity-matching problem, and the deeper fix — idempotent system design that prevents the same event from ever being recorded twice — is more reliable than any deduplication step applied downstream, which is why mature data systems treat duplicate prevention as an architecture decision rather than purely a data-cleaning task.