A One-to-One relationship between two entities indicates that one record in Entity A corresponds to one record in Entity B and one record in Entity B has only one associated record in Entity A. In this case the reference attribute can be either in Entity A or Entity B. To decide which entity contains the reference attribute you have to consider the optionality of the relationship.

How to implement a One-to-One relationship:

In one of the entities involved in the relationship, make the primary key a reference attribute of type <Other Entity> Identifier.


Suppose, that in your business logic, you have these entities and attributes:

A ContactPhoto always belongs to a Contact. A Contact can have one ContactPhoto associated. This can be helpful if you want to optionally customize the Contact entity.

To implement this relationship, the Primary Key of the ContactPhoto must be a reference attribute to the Primary key of the Contact:

Entity Diagram

eSpace tree

When both sides of the relationship are either mandatory or optional, you have to decide to which Entity you should add the relationship, considering factors like which entity is shared the most.

See Also

Create Relationships | One-to-Many Relationships | Many-to-Many Relationships | Entity Diagram