Subtopics
Shared Primary Key:
In the shared primary key mapping, the primary key of the owning entity is also the primary key of associated entity and it can simplifies the mapping and ensures the one-to-one relationship.
Foreign Key association:
In this approach, The associated entity can holds the foreign key referencing the primary key of the owning entity. This is the common method for the implementing one-to-one mapping and it can especially when the associated entity can exist independently.
JPA One-to-One Mapping
In Java, JPA can define the Java Persistence API, One-to-one mapping is the common association relationship where one instance of the entity is associated with exactly one instance of another entity.