Skip to content
VinceZK edited this page Apr 6, 2020 · 3 revisions

In JOR, role is used to grant attributes and relationships to entities. Role can group relations and be assigned to entities. Entities gain attributes through roles assigned to them. Meanwhile, relationships among entities are also performed by roles.

This can be well analogized using real life examples. A man gets employed, then he is assigned with the employee role, which gives him additional attributes, like, title, department, system user, and so on. He then is assigned with husband role when he is married with a woman. The marriage relationship is performed by the husband role and the wife role.

Create Role

In the modeling tool, go to the 'Role' tab. The left list shows the 10 latest roles in the system. You can run a fuzzy search which filters in names and descriptions. Click the '+' button on the top right, you can create a new role.

You must give a unique name, and optionally, some description.

Relation

You assign relations to a role to attach attributes. Cardinality should also be tagged on each assigned relation. 4 cardinality options are provided:

  • [0..1]: The relation has no or only one item.
  • [1..1]: The relation must have one and only one item.
  • [0..n]: The relation could have no or many items.
  • [1..n]: The relation could have at least one item or many items.

It is not mandatory to have relations. A role can only be used to build relationships.

Change Role

You can add or remove relations, or change their cardinality. Inconsistencies could happen if you, for example, change the cardinality from '[0..1]' to '[1..1]'. However, these inconsistencies caused by changing role don't impact data in DB.

Clone this wiki locally