The Boston Object-Role Modeling Metamodel — Pt2 — Value Types

Framework for a Knowledge Graph / Index

Victor Morgante
7 min readSep 11, 2024
A Value Type in Object-Role Modeling. Image by author.

A Value Type is one of the atomic building blocks of a Knowledge Index or Knowledge Graph. We recognise them as the Columns of Entity-Relationship Diagrams and the Properties of Property Graph Schema for graph databases.

In as much as we focus on the Entities or Node Types of databases, e.g. Employee, an Entity Type is nothing without its related Value Types.

If I walked up to you and said, “Employee”, a natural reaction would be “Which Employee?”, and from there we draw on the Value Types that identify the employee, “Jane Smith”.

— -
This article is an abstract from my book on Object-Role Modeling (ORM), “Mastering Object-Role Modeling” and is the second part of a description of the Object-Role Modeling metamodel that is the backbone of the Boston conceptual modelling software by FactEngine.AI.

As you may know, a metamodel is a model of a model, and the metamodel of Object-Role Modeling is a model, and an Object-Role Model may suitably describe/define that model.

In this way, if we simply investigate what a Value Type is, we can relate it to its place within the ORM metamodel and Object-Role Modeling at the same time.

— -Extract from “Mastering Object-Role Modeling” — -

A Value Type in Object-Role Modeling represents a domain of values, rather than an Entity Type or Fact Type (association). Value types are used to represent data that does not have a separate existence outside of the object that is related to values of that Value Type.

Value Types represent data of a particular Data Type, such as integers or strings, dates or times. Value Types can also be used to represent things like codes or flags, which may be used to control the behaviour of an object or system.

Value Types range over a domain of data vales and where the name of the Value Type loosely defines the data values of roles played by that value type, within the population of Fact Types. An example Fact Type follows, but first we provide an example Value Type.

Value Types in Object-Role Modeling are drawn as round rectangles with a dashed line and the name of the Value Type within the dashed rounded rectangle, as in the Figure 8.1 below.

Figure 8.1 An example Value Type. Image by author.

The Value Type, Name, in Figure 8.1 loosely defines the data values of roles joined to that Value Type. For example, Figure 7.2 shows where a person (entity) of the Person Entity Type must have a first and last name, may have a middle name and where first, middle and last names are all of the Value Type, Name. The data values for those names are only loosely defined by the Name Value Type, and require an interpreter’s (e.g. your) understanding of what a name is, and what are example data values for name (e.g. Peter, or, Jenkins).

Figure 8.2 Three fact types with roles joined to a value type

Figure 8.3 shows the same three Fact Types as in Figure 8.2 with Sample Populations of data values that fill the slots of the roles of those Fact Types. The ORM diagram shows that there exists a person with a Person_Id of 1 who has the first name, Peter, the middle name, James, and the last name Jenkins.

Figure 8.3 An object-role model with sample populations for fact types

Value Types and Reference Modes

In our examples above, Person (.Id) is shorthand for saying that each person is identified by a corresponding value for the Value Type, Person_Id (see Figure 8.4). Where an entity of an entity type is identified by a single value of a Value Type, this is known as a Reference Mode. We cover this again and in detail in the next chapter. So the shorthand notation for reference modes is another way of drawing the existence of a value type within a universe of discourse.

Figure 8.4 An expanded reference mode for an entity type

Value Types as Labels

Figure 8.5 A fact type with a sample population

In the example ORM diagram in Ficture 8.5 above, it is easy to see that a Value Type and Entity Type are labels that are given to a thing, but are not the actual thing themselves. I.e. Person is not an instance of a person, and Name is not an instance of a thing, but rather labels. While the string ‘Peter’ may be seen as instance (thing) of the Value Type, Name, and 1 is an instance of Person_Id, neither Name, Person or Person_Id are the things they loosely describe. Together with the linking fact type they describe a person (or thing) identified by the number, 1, and with a first-name, ‘Peter’. By convention in Object-Role Modeling, ‘Peter’ only becomes a thing in our Universe of Discourse if the Value Type is converted to an Entity Type, otherwise the value ‘Peter’ is just something that describes an individual Person.

Value Types and Entity Types

A Value Type may, if the need arises, be changed into an Entity Type within an ORM diagram as the documented universe of discourse is updated over time.

The easiest way to know whether something is a Value Type, as opposed to an Entity Type, is when you would find it particularly difficult to find sense in having a reference mode for the type, and where the name of the Value Type is what you would commonly refer to as a label of something else. E.g. Name is easily identifiable as a label of a person, but not a person.

If, however, you started to talk about names as actual things, as in onomastics (the study of names), then Name is easily envisaged as an Entity Type, as below in Figure 8.6.

Figure 8.6 Names are entity types in onomastics.

For example the names Kaiser, Shar, Tsar, Qayser and various other similar names all have an origin that stems from the name Caesar, after Julius Caesar the emperor of Rome. Figure 7.5 shows that a Name, referenced by its textual form (e.g. Tsar), is an Entity Type with a universe of discourse that covers the field of onomastics, whereas in Figure 7.4 Name is a value type.

Inventing Value Type Names

To some, it may come as a rude shock that it is quite okay to invent labels to represent things (e.g. a Value Type called, ‘SocialSecurityId’). In ORM it is certainly okay and becomes part of the design (rather than documentation) process of ORM.

Naming Value Types

Because a Value Type represents a set of objects, quite readily the name (or label) given to a Value Type is indicative of the unique nature of each member of the set.

For example, if the Social Security Number of each person represented in a UOD is unique, then a Value Type created to represent those numbers could be named (simply) ‘SocialSecurityNumber’.

— -End of Extract — -

So, within the Boston Object-Role Modeling metamodel, Value Type is captured as:

Value Type within the Boston Object-Role Modeling Metamodel. Image by author.

We see the standard Fact Types that equate to Columns/Attributes/Properties that we would expect for a Value Type:

  1. ValueTypeName;
  2. DataType;
  3. DataTypeLength;
  4. DataTypePrecision;
  5. Is Independent? (per the ORM2 standard); and
  6. GUID (a unique GUID/UUID to make the Value Type universal).

NB ValueTypeName is redundant because it is the same as the Symbol that represents the Value Type within a Model.

NB Because we are dealing with an ostensible First-Order Logic with Object-Role Modeling, we can use the actual Name/Symbol of the Value Type as its identifier (along with ModelId) because it is not going to be confused with a Fact Type, or Role Constraint that must have a unique name within the model, each of those also being a subtype of the MeetaModelModelDictionary.

Is MDA Model Element: is a special boolean flag on the associated Entity/Node Type for Value Type, and indicates whether the Value Type belongs to a M2 layer metamodel or not, rather than a regular Object-Role Model as projected by the software using the/a model within the metamodel.

The Many-to-Many Fact Type, MetaModelValueTypeHasMetaModelValueConstraint is for storing a set of one or more Symbols that are values that constrain the Value Type’s domain.

Mastering Object-Role Modeling

You can read the chapter excerpt in this article in my book, “Mastering Object-Role Modeling”, available on Amazon:

Book Cover — Mastering Object-Role Modeling. Image by author.

Thank you for reading. As time permits, I will write more about the Boston Object-Role Modeling metamodel, and the atoms of a Knowledge Index and Knowledge Graph.

==================End=================

--

--