Contents

Mediator vs CVT (and Enumeration)

Mediators and CVTs (Compound Value Types) have been synonymous in the past. However, there has been recent discussions to distinguish the two in terms of user experience (freebase.com), schema development (schema editor) and mass data loads (MDOs).

The key distinctions between the two are:

A CVT (terminal CVT) is a multi-field value type that is comprised of terminal value types or types that do NOT link back to the CVT. All literal system types like /type/text, /type/datetime, /type/int, /type/float, /type/boolean, etc. are considered terminal. The /measurement_unit/dated_integer is considered to be a CVT since it's composed of a date (/type/datetime), a number (/type/int) and a Source (/dataworld/information_source). Even though the Source links to a non-literal system type (/dataworld/information_source), there is no reverse link back to the CVT, so the CVT is considered terminal.

A Mediator (non-terminal CVT) is a multl-field value type that is composed of one or more non-terminal value types or types that link back to the mediator, thus creating a loop. A prime example is the /film/performance type that is composed of a film (/film/film), an actor (/film/actor) and additional metadata about the film performance. The /film/actor and /film/film types have reverse links back to /film/performance mediator. These reverse links create a non-terminal CVT.

Going forward, we would like to expose these differences in the freebase.com client, first starting with the schema explorer/editor and then in the topic view/edit pages and ultimately TBD collection pages.

The Freebase client has been using /freebase/type_hints/mediator=TRUE to denote a CVT/mediator (terminal and non-terminal) and /freebase/type_hints/enumeration=TRUE to denote an enumerated type (A type with a finite set of instances like /people/gender).

It is important to note that these type hints were meant to be disjoint. You can't have a type that is both a mediator and an enumeration.

To be backwards compatible with the (python) freebase.com client (Freebase client), we will continue to use these type hint properties but will introduce a new property, /freebase/type_hints/role which will be unique and it's expected type will be an enumerated list of type roles. We will first start with three roles, Mediator, CVT and Enumeration.

Mediators (non-terminal CVTs) will have /freebase/type_hints/mediator=TRUE and /freebase/type_hints/role=MEDIATOR

CVTs (terminal CVTs) will have /freebase/type_hints/mediator=TRUE and /freebase/type_hints/role=CVT

Enumerations will have /freebase/type_hints/enumeration=TRUE and /freebase/type_hints/role=ENUMERATION