Previous Topic: Scope

Next Topic: Triples

Entity Relationships

You can specify relationships between entities. The two most common relationships are owned by and refers to (both are used in this tutorial).

owned by

Creates a parent-child relationship. The child entity cannot exist independently of the parent entity. In the application that you build in this tutorial, the Project entity is the parent of the Task entity. Tasks cannot exist unless they are part of a project. Therefore, if the project is deleted, the tasks should automatically be deleted.

refers to\-

Creates a link between entities, but both entities can exist independently. In the application you build, you create an Employee entity. The Task entity refers to the Employee entity, by which end users assign employees to tasks. If the task is deleted, the employee still exists.