“Error: Unmarried Mother” flashed across the computer screen as 30-year-old Riz began the process of renewing his Pakistani Computerized National ID Card (CNIC), a compulsory identification document that functions like a social security number, driver’s license, and passport all rolled into one. Riz’s parents have been married for 31 years, but the database did not agree; there was no way to proceed without this validation check. Every visit to the registration office ended with an officer saying, “Sorry, sir, the computer doesn’t allow it.”

Without a renewed CNIC, Riz could not even buy a bus ticket. In Pakistan, access to sectors and services as diverse as telecom, banking, health records, social welfare, voting, and employment have all been made contingent on having a verified record with the National Database and Registration Authority (NADRA).

Riz’s identity validation problem was not caused by a glitch in the system. The requirement of having two married parents is, instead, an example of the social judgments encoded within Pakistan’s digital ID database design. It turned out that, to avoid taking on her husband’s family name, Riz’s mother had never updated her marital status with NADRA. In the analog Pakistan of the early 1990s, she had gotten by without issue. Thirty years later, social expectations had become embedded into databases, and Riz would be unable to access basic services unless a query on his mother’s marital status returned “TRUE.”

Riz’s experience tells the larger story of how Pakistan chose to structure its digital ID system. The system places each individual within a comprehensive digital family tree. Digital households are built up of pre-encoded, socially and legally approved relationships, and can be connected to other households through similar socially and legally approved relationships. Each registered individual is required to prove ties of blood or marriage to another verified Pakistani citizen. Marriages (state-approved) create a link between two households, and children (only through marriage) create a continuing link with both households’ genealogies.

Pakistan’s experience with creating databases that encode kinship reveals important lessons about the complexities of building digital ID systems. Database design is not just computational. At every step, social, political, and technical decisions coalesce.

In 1973, Pakistan was fresh out of a war of independence; two years earlier, East Pakistan had become Bangladesh. Pakistan, having suffered a blow to its legitimacy, now wanted “a full statistical database of the people of this country.” Parliament created an agency responsible for providing every citizen a state-issued ID, conducting statistical analysis of the population, and building rules around the identification of citizens.

Who counts as a citizen is a politically fraught question for any nation, but particularly for a country with a complex relationship with migration. After the 1947 partition between India and Pakistan, many hundreds of thousands of individuals born in land accorded to Pakistan migrated to India, and vice versa. Citizenship rules became a tricky dance between ensuring that descendants of these migrants to Pakistan received citizenship while not setting precedence for later waves of migrants to lay claims on the state. Citizenship was thus accorded to those who were born in Pakistan after 1951, and to the descendants of those who migrated to Pakistan before 1951. (This cut-off date was later changed to 1971 to accommodate the wave of migration after Bangladesh’s independence.) As Pakistan faced more waves of migration, largest among them from Afghanistan, rules for citizenship and identification merged. Evidence of identity, like citizenship, was tied to family and descent.