-
Notifications
You must be signed in to change notification settings - Fork 4
JOR Concept
An entity is a "thing" which can be distinctly identified. A specific person, company, or event is an example of an entity. A relationship is an association among entities. For instance, "marriage" is a relationship between two "person" entities.
Details are illustrated in the following diagram:
An Entity can have multiple direct attributes, as well as indirect attributes from the Roles that are assigned to it. Roles don't have direct attributes either, but derive from the relations that are assigned to them.
A relation corresponds to a DB table, and its attributes are fields of the table. Relations can have associations with each other. For example, relation "r_employee" has a 1-on-1 association with relation "r_company" on the field "COMPANY_ID". Even 2 relations that belong to 2 different entities can be associated.
Relationships are performed by Roles. Once a role is assigned to an entity, the relationships on the role are passed to the entity. The instances of the entity can then be connected with other instances according to the relationship definition.
Both Entity and Relationship can have attributes, thus they can also be regarded as 2 special kinds of relation.
To achieve re-usability and context consistency, the meta of an attribute can be defined as data elements and data domains. A data domain is used to boundary the value type and range of an attribute. For example, data domain "Country" contains all the country codes in the world. A data element can be created on a data domain by adding more business semantics like labels, documentations, and so on.
Each artifact is elaborated in the corresponding chapter: