Previous Topic: Defining Attributes with the Diagrammer

Next Topic: Defining an Owned By Relationship

Defining Relationships Between Entities

In this section, you define two relationships between entities: an owned by and a refers to relationship.

In your application, a task is part of a project. Therefore, if you delete a project, you want all of its tasks deleted. Because of this, you define Project as the owner of Task; so that each task is directly related to the project it is part of. This is known as an owned by relationship, which is sometimes referred to as a parent-child relationship.

When you define a task for a project, you must specify an employee who is responsible for completing the task. Because an employee can be assigned to more than one task, in more than one project, you do not want to delete the employee record if you delete a task. So, you define a refers to relationship between the Task and Employee entities.