Skip to content

One-to-one (data model)

A relationship cardinality in which each instance of either entity type is associated with at most one instance of the other, with optionality specified separately.

Core Idea

A one-to-one relationship in data modeling constrains two entity types so that each instance on either side is associated with at most one instance on the other. Minimum participation is separate, so a one-to-one relationship can be optional on one or both sides rather than a total mathematical bijection. Optionality is separate. Optionality is separate.

How would you explain it like I'm…

Each Kid, One Cubby

Think about kids and their own cubbies at school. Each kid gets at most one cubby, and each cubby belongs to at most one kid. Some cubbies might be empty, but no cubby is shared and no kid has two.

Matched in Pairs

Databases keep track of how things are connected. In a one-to-one relationship, each thing on one side matches with at most one thing on the other side, and the other way around too. For example, each person might have at most one passport, and each passport belongs to only one person. Some people may have no passport, and that can still be one-to-one. What matters is the rule the world follows, not just what the list happens to show today.

One-to-One Cardinality

In data modeling, a one-to-one relationship between two entity types, A and B, means each A is linked to at most one B, and each B to at most one A. Both "at most one" limits are needed; if either side is allowed to have many, it becomes a different kind of relationship. Whether every item must have a partner is a separate question, called optionality: it can be exactly-one on both sides, exactly-one on one side and optional on the other, or optional on both. In math, a perfect pairing where everything has exactly one partner is a bijection, but many database one-to-one designs allow some rows with no partner. The rule must come from the real situation being modeled, not just from a pattern that happens to show up in the current data.

 

A one-to-one relationship constrains two entity types so that each A instance relates to at most one B and each B to at most one A; the two maximum-one constraints are reciprocal, and relaxing either one yields one-to-many or many-to-many. Minimum cardinality (optionality) is independent: designs may be exactly-one to exactly-one, zero-or-one to exactly-one, or zero-or-one on both sides. A mathematical bijection corresponds only to the total exactly-one case, whereas many database designs called one-to-one allow nonparticipating rows. Cardinality is a business rule of the modeled domain, so observing that a snapshot happens to pair rows uniquely does not establish it. Relationally it is usually implemented by a shared primary key or by a foreign key with a uniqueness constraint, with nullability and referential rules encoding the chosen minimum cardinalities.

Scope of Application

The cardinality applies when domain rules make two entity identities correspond uniquely in both directions. The relationship applies when reciprocal uniqueness is a genuine domain rule and the schema can enforce it.

  • Entity–relationship models. Diagram endpoints record maximum and minimum participation.
  • Relational schemas. Unique foreign keys or shared primary keys enforce reciprocal uniqueness.
  • Vertical decomposition. Rare or sensitive attributes can be separated while preserving one identity.
  • Extension tables. A subtype-specific row corresponds to at most one base row.
  • Data integration. Cross-system identifiers can be asserted one-to-one only after domain validation.

Clarity

State both directional maximums and both minimums. Define the entity types and time horizon precisely, because identity rules can change cardinality. Show how uniqueness, nullability, and foreign keys enforce the model. Test counterexamples from the real domain rather than inferring rules from current rows. The closest near miss sets the boundary: A bijection is the closest mathematical near miss or stronger case: it requires every A and B to participate exactly once, while database one-to-one often permits zero-or-one on one or both sides.

Manages Complexity

The abstraction compresses two reciprocal uniqueness constraints and optionality into a relationship signature. It helps decide whether entities should be merged, split into extension tables, or linked, while preventing temporary data regularities from becoming false domain rules. The central semantic rule–observed data tradeoff is this: A clean snapshot cannot prove the domain forbids future multiplicity. A second separate tables–single entity tension matters because One-to-one decomposition can isolate concerns but add joins and lifecycle coordination.

Abstract Reasoning

Use three linked moves: define A and B identities and the meaning of one instance on each side; ask the maximum number of B instances valid for one A, then reverse the question; specify minimum participation separately for each direction. As a collapse test, the case exits when either endpoint can validly relate to two or more instances of the other under the domain definition. A fourth check is to search domain history and edge cases for legitimate multiplicity. A final check is to implement and test uniqueness plus referential constraints matching the result.

Knowledge Transfer

Bidirectional maximum-one cardinality transfers across conceptual, logical, and physical models. The phrase becomes misleading when used for current row counts or one-way uniqueness only. No canonical parent prime is currently asserted; broader structural comparisons remain related-prime analogies until separately adjudicated in the DAG. Endpoint bounds classify the relationship. Schema rules preserve the modeled maximums.

Neighborhood in Abstraction Space

One-to-one (data model) sits in a moderately populated region (56th percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Property Ontology & Code Smells (18 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14