Advertisement
Data Processing

The Stripped Country Code: Three Subscribers, One Surviving Number

A phone number is a pair: a country code that says which national numbering plan the rest belongs to, and a national number unique only inside that p...

A phone number is a pair: a country code that says which national numbering plan the rest belongs to, and a national number unique only inside that plan. Export the pair carelessly, keeping the national number and dropping the code as decoration, and the same national number belonging to subscribers in different countries becomes one and the same key. In a measured set of 300 subscribers, built as 100 national numbers each held under three country codes, stripping the plus sign and the country code left only 100 distinct keys and produced 200 false merges, while the stripped keys matched the full keys exactly 0 of 300 times (Source: batch 16 SD measurement results, group AG6). Rebuilding the full form from the country column the export had kept restored all 300 subscribers, with 0 false merges (Source: batch 16 SD measurement results, group AG6).

What The Stripped Country Code means

The stripped country code is the condition of a phone export that drops the international prefix and keeps only the national number, so subscribers in different countries whose national numbers coincide collapse into a single key. In the measured set, 300 subscribers were constructed as 100 national numbers, each held by one subscriber under country code 1, one under 44, and one under 49, making 300 distinct full numbers (Source: batch 16 SD measurement results, group AG6). The export rule kept only the national number. On that basis, the stripped keys numbered only 100 distinct values for 300 subscribers, de-duplication on them produced 200 false merges, and a stripped key matched its full key exactly 0 of 300 times (Source: batch 16 SD measurement results, group AG6). The concept applies to any export or identity join that treats a national number as a complete phone identity. It does not apply within a single-country file whose country is declared once for the whole file; the harm needs more than one country in the data.

The nearest neighbour is The Attached Title, and the two failures run in opposite directions. In The Attached Title, one source added material, a title in front of a name, so the fuller string no longer equalled the bare one and an exact join missed records that should have matched; the failure was separation. The stripped country code removes material instead of adding it. Nothing in the surviving national number is wrong, but something essential is gone, and the failure is the reverse of separation: records that should stay apart are forced together, 200 false merges across the measured set (Source: batch 16 SD measurement results, group AG6), because the stripped key is shared by three different subscribers. One concept fails because a string has too much in it; the other because it has too little.

One Hundred Keys for Three Hundred Subscribers

The collision is not a risk in this construction; it is a certainty, fixed by the design. Each of the 100 national numbers was held under all three country codes, 1, 44, and 49 (Source: batch 16 SD measurement results, group AG6), so each stripped key was claimed by exactly 3 subscribers. De-duplication keeps one record per key, so 300 subscribers became 100 surviving records and 200 were absorbed into somebody else's record, counted as 200 false merges (Source: batch 16 SD measurement results, group AG6). Which subscriber survives is an accident of row order, so the export attributes one person's number to another person's identity, in a different country.

Real files soften the arithmetic without removing the mechanism: collisions arrive irregularly rather than in perfect triples, but each coincidence is a false merge that cannot be spotted by inspecting the value, because the stripped number is a perfectly valid number, for somebody, somewhere. And stripping produced a key set in a different namespace altogether, one that joins to the original data nowhere.

The Country Column That Saved the File

The recovery depended on a column the export almost did not need. The export had retained a separate country field for each subscriber, even while stripping the country code out of the phone value itself. Rebuilding each full number as the plus sign, the country code from that retained column, and the national number restored the key set completely: 300 of 300 subscribers matched, with 0 false merges (Source: batch 16 SD measurement results, group AG6). The information needed to undo the damage had travelled with the file all along.

That accident should be read as a warning. Had the export dropped the country column as redundant, the stripping would have been irreversible from the file alone (Source: batch 16 SD measurement results, group AG6). The durable rule is to treat the international form as the atomic value: store the full number, plus sign and country code included, as the phone field of record, and never let a stripped view become a key or a join field. A prefix that looks like formatting is the part of the value that says which world the rest of the value lives in.

How The Subscribers Were Measured

Counting for this article happened inside a deterministic scripted simulation, run under seed 42, whose cast was wholly synthetic, invented end to end. The program enrolled 300 imaginary subscribers by taking 100 national numbers and issuing each one three times, once beneath country code 1, once beneath 44, and once beneath 49 (Source: batch 16 SD measurement results, group AG6). It then graded three things. Direct comparison between a stripped key and its complete counterpart succeeded 0 times in 300. Collapsing rows by the stripped key alone compressed the cast to 100 survivors and manufactured 200 false merges. Reassembling complete numbers from the country column that travelled alongside the export undid the damage entirely, restoring 300 matches in 300 with zero false merges (Source: batch 16 SD measurement results, group AG6). Being wholly synthetic, the exercise evaluates no commercial product and rates no vendor.

The Stripped Country Code: Three Subscribers, One Surviving Number

Questions, answered

If a file covers only one country, is stripping the code harmless?

Within a single declared country, a national number can be a workable key, but the safety belongs to the declaration, not to the stripped value. The measured failure needed three countries sharing 100 national numbers to produce its 200 false merges (Source: batch 16 SD measurement results, group AG6), and files acquire a second country quietly, at which point every previously safe key becomes ambiguous retroactively.

Why did no stripped key match its full key, even for country code 1?

Because stripping removed the plus sign as well as the code's digits, so even a subscriber under country code 1 kept only the national number, which differs from the full form for every record. The measured exact match was 0 of 300 (Source: batch 16 SD measurement results, group AG6). The stripped file is a different key set, unjoinable without outside information such as the retained country column.

What made the recovery possible here, and when would it fail?

The export retained a country column, and rebuilding plus, country code, and national number from it restored 300 of 300 matches with 0 false merges (Source: batch 16 SD measurement results, group AG6). Recovery fails when that column is absent or incomplete, because the stripped number alone carries no trace of which colliding subscriber it came from, and a later rebuild cannot unmerge records already combined.

Is the answer to stop de-duplicating phone numbers?

No; the answer is to de-duplicate on a key that identifies. On full international numbers, the 300 measured subscribers were distinct and de-duplication had nothing false to merge (Source: batch 16 SD measurement results, group AG6). The false merges were manufactured by the stripped key, not by de-duplication itself. Audit the key first, and only then let the run proceed.

Summary

The stripped country code is what remains when an export treats the international prefix of a phone number as decoration: a national number unique inside one country and ambiguous across the world. In the batch 16 synthetic measurement, 300 subscribers built from 100 national numbers held under country codes 1, 44, and 49 collapsed to 100 stripped keys with 200 false merges, the stripped keys matched the full keys 0 of 300 times, and rebuilding from the retained country column restored 300 of 300 matches with 0 false merges (Source: batch 16 SD measurement results, group AG6). Where The Attached Title fails by addition, this concept fails by subtraction. Keep the full international form as the value of record; let stripped forms exist only as views, never as keys.

Sources

Know someone who needs this? Share it.

Advertisement