Entity Relationship Notes

This is an attempt to refine a logical framework to describing relationships between entities. What the entities actually are doesn’t matter – this framework addresses the concepts of logical entities with some functional relationship between them. This framework doesn’t concern itself with the entities themselves, their properties, their types, their disposition. They only need exist and be identifiable. This framework addresses the relationships between them.

This framework is an attempt to be utterly complete, but is likely too complex to be implemented as described. Implementations would be abbreviated as necessary to fit the situation.

Contents

Scope of Relationships

  1. Entire content object
  2. Property specific
    1. Having a property specific relationship is another piece of metadata about that relationship
    2. By putting a relationship in a property, you are specifying the type
      1. You have a property of “Father.”

Relationship Type vs. Relationship

A “type” is a class. A “relationship” is the actual relationship – an instance of the class.

Universal Properties of Relationship Types

  1. Is first-order or derived relationships?
  2. Entity A Restrictions
  3. Entity B Restrictions
  4. Description
    1. Current
    2. Future
    3. Past
  5. Name
    1. Current
    2. Future
    3. Past
  6. Is it date-dependent or universal?
  7. Ad Hoc Properties
    1. At what point does the relationship become its own object?
  8. Derivative rules
    1. What relationships are further defined by this one?
  9. What is the direction of the relationship?
  10. What is the exclusivity or repeatability of the relationship?

Entity Names

Names for each entity in the relationship, not in relationship to the other entity.

Origin of Relationship

First-order or Derived.

Certain relationships can/should never be first-order, they can only be derived.

Problem-ish: how granular do you want to go? On occasion, to establish a derived relationship, you will need to create multiple first-order, predicate relationships

Direction of Relationship

  1. One-way.
    1. But does this exist, really? “John likes Jane.” Even if Jane is indifferent, “Jane is liked by John” is implied. So, can any relationship really be one-way?
    2. Perhaps it is just unacknowledged relationship?
    3. Should it be discoverable in the other direction?
  2. Two-way, derivative, equal
    1. The relationship is the same in both directions.
    2. “John is Jack’s brother.” By definition, then “Jack is John’s brother.”
    3. “Article A is related to Article B. Article B is also related to Article A.”
  3. Two-way, derivative, unequal
    1. If the relationship exists in one direction, then an inverse also exists, but it is different.
    2. “John is Mary’s father. Mary is John’s daughter.”
    3. Is the type of relationship always derivative? If John is Mary’s father, then Mary has to be John’s child – the relationship type is impossible to change.

Repeatability of Relationship

  1. Someone can only ever have ONE father. This relationship is absolute and eternal.
  2. Someone can only have one spouse at a time. This relationship can be repeated, so long as the first one has ended.

Derived Names of Parties

Being in a relationship gives you a name in relation to the other party.

  1. John is married to Tess.
  2. John is Tess’s husband.

When a relationship ends, the name changes.

  1. John was married to Tess.
  2. John is Tess’s ex-husband

Derived Relationships

Does being in relationship X automatically put you in relationship Y?

  1. John is married to Tess.
  2. Tess is sister to Mike.
  3. John is then derived to be brother-in-law of Mike.

A derived relationship has to be one that would not exist without the predicate relationship.

Time Status of Relationships

Once it exists, it can be described in relationship to it’s start and end dates (see also: “Tense of Relationships”). A relationship has three statuses:

  1. Future. Prior to start date.
  2. Current: Between start and end dates.
  3. Past: After end dates

Relationships can also be eternal, or not date dependent. Example: “parent-child.” There is no start or end date to this. It just is and always will be – it exists as soon as the two objects exist, and remains forever.

Tense of Relationship

When a relationship ends, does it leave fingerprints?

  1. Future: John will start working at MegaCorp on January 1, 2010.
  2. Current: John works at MegaCorp.
  3. Past: John worked at MegaCorp from January 1 to December 31, 2010

Granularity

How granular do you get?

Example: Marriage

Example: Employment