Previous Topic: Helpful Hints

Next Topic: Putting It All Together

Owned By Relationships and OBASE/Child

You already added the triple shown next using the Diagrammer. For more information, see Define an Owned By Relationship in the chapter "Diagramming Entity Relationships." You also added the following triple.

Task owned by Project

This specified a relationship between these two entities. That is, that Project owns Task. For more information, see Defining the Task Entity earlier in this chapter.

Task is a OBASE/Child

This gave the Task entity functionality to ensure that when a project is deleted, all of its child tasks are deleted, too. But you may wonder why, if you already added this triple, you also used the Template Editor to create the following triples:

Task replaces Owner
...by Project

You had already specified the owner in the Task owned by Project triple. Why did you seemingly have to specify the owner a second time?

The answer is that you did different things to the model each time you specified the owner. Adding the triple Task owned by Project gave Task an additional key field—Key of Project. That is all that happened when you added that triple. The owned by triple did not add any functionality to Task.

Task is a OBASE/Child gave Task functionality. Specifically, when you inherit from OBASE/Child, you get the ability to:

However, the functionality that you inherit is abstract. That is, it does not know what is in your model. The pattern entity, OBASE/Child, uses an abstract entity, called Parent, to represent the owner. For the pattern to work correctly in your model, you have to replace this placeholder with the entity you want to be the owner. That is why you create the replacement triple.