Previous Topic: Triples

Next Topic: Project Management Application

Inheritance

Inheritance enables an object to include the properties of another more generalized object. You specify inheritance for an object using the is a verb. For example, FLD is a FLD means that the source field inherits all of the properties and scoped objects of the target field.

Another way to assign the data type of character and the length 25 to the Employee Name field is to enter the following triple:

Employee Name is a OBASE/Narrative

OBASE/Narrative is a field that displays 25 characters or settings, which are inherited by Employee Name by way of this triple. So, rather than specifying all the settings for a field, you can choose a field that already exists, and which reflects what you want your object to look like (or acts like you want it to act), to inherit from. Using inheritance saves time.

For example, you could create the following two entities, if you needed to create two types of Project entities in a project management application. One would represent projects that were billed by the hour; the other would represent projects that were bid by job.

PLEX--Inheritance (3)

Creating two types of Project entries would require a lot of duplicated effort. The identifier, description, and start and end dates are the same for both entities. Why should you create all of the functionality for these identical fields twice?

Using inheritance enables you to create a single Project entity with all of the common structure and functionality, and create two specialized entities that inherit from that one. Then, you can customize each type of project from there.

The following graphic shows the entities Project Billed By Hour and Project Bid By Job as they would appear after they have inherited from Project.

Note: The inherited attributes have dashed borders.

PLEX--Inheritance (4)