A relationship is a representation or model of a relationship between entities that is relevant to your application. For example, a music store inventory application might be interested in the relationship between the "Artist" entity and the "Album" so that it can retrieve all albums for a given artist.
The concept of parent and child entities is simply used to differentiate between the related entities in the following definitions.
Association names are used to provide more context to the entities in a relationship. For example, in a customer database application there might be a relationship between "Person" and "Address" entities and the association name for "Person" might be "Occupant". Similarly the association name for "Address" could be "Home Address".
Association names can be useful when an entity exists in many different contexts or the association between entities a relationship is not obvious.
The following relationship types are available:
Type | Description |
---|---|
one-to-one | For each parent entity there is at most one related child entity. |
one-to-many | For each parent entity there can be many child entities. |
An identifying relationship is one where the the child entity is partly identified by the parent entity. For example, in a personal finance application, the relationship between a "Person" and an "Account" may be identifying because an account is owned by a specific person.
This property is only application to identifying relationships. It specifies the behaviour when a parent entity of the relationship is deleted. If cascade delete is enabled then all of the identified children entities will also be deleted. If it is not enabled, then the parent entity can only be deleted when there are no children entities.
This is a description of the relationship, and may be used to clarify the connection with the real world relationship that it represents.