Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>

[[ 🗃 ^yEzqv rel4tion-wiki ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/yEzqv

SSH: git clone USERNAME@vervis.peers.community:yEzqv

Branches

Tags

master :: projects / smaoin / design / logical /

entities.mdwn

We will now see what entities are and how they are used in data models to represent real-world entities.

The expression model should be able to describe anything. Every “thing”, every notion and concept should be able to have a description and a reference within a data model expressed using our expression model. Therefore, the expression model needs a concept which represents a “thing” in the universe. In a similar fashion to the analogy between sets and classes and between properties and relations, the model’s representation of a “thing” is called an entity. Entities are the “atomic unit” in the expression model: Everything is an entity, either a primitive one or defined through other entities.

When we talk about concepts, we use context to recognize the exact concept being referred. For example, if I say “the computer works”, I probably refer to a specific computer I use right now, maybe my computer. If we cannnot recognize the thing being referred, we usually say “I don’t understand, please explain it again”. However, computers can’t think and perceive abstract concepts. In order to recognize things as unique and different, they need concrete representations which can be compared for equality and searched in a list or a database.

In the expression model such a unique representation is called unique identifier or uid. A uid doesn’t refer to the actual “thing”, but to its representation in the data model. For example, different distant unrelated computers may contain the same song in the music folder. Then they both have an entity in the semantic database, referring to that song. The uids are probably different if they are generated locally, but the entities refer to the same thing: that specific song. However, sharing of information between computers can be easier when shared entities (like songs) have a common uid used by everyone when referring to them.

The uid is the way computers use to refer to a specific entity uniquely: uids should be at least locally-unique (i.e. inside a database), and strive to be globally unique (i.e. no two databases generate the same uid locally). Mechanisms for generation of globally unique uids already exist, for example [[!wikipedia UUID]].

The expression model doesn’t limit the possible ways to create and represent uids: Anything that can be at least locally unique can serve as a uid. In computers, uids can be simply sequences of bytes.

In the conceptual level, the concept of “predefined entities” was mentioned. These entities have a different nature than the other entities. Consider the following two actions:

A database containing information about people doesn’t define people. It describes them. Why? Because a full “definition” of a person must define the precise physical details of that person on the molecular level, specify the person’s full DNA, etc., fully describe the person’s personality, the exact structure of the body, all the memories contained in the brain, etc. Computers don’t do that: They just say “John is a person and here’s some information about John”.

In contrast, if a computer stores the number 1 in a digital binary electronic mechanism, it refers to externally predefined number 1. In addition to refering to it, the representation of the reference itself says “this is the number 1”. The digital representation of 1 can be thought of as a uid that is globally accepted for referring to 1.

Let’s use another example: If two unrelated computers describe the same song, they may generate uids locally and have different uids for different entities, while both entities refer to the same thing. The song. But if both computers want to refer to the number 1, they will use exactly the same representation! Even if it’s slightly different due to technical reasons (e.g. endianness), a simple software program will be able to convert between representations easily. No bridging is needed: The number 1 is the same 1 everywhere.

One consequence of the fact values are predefined and not described, it that values cannot be in the object part of a statement. The expression model doesn’t accept a statement like “1 is-a number” because 1 is already defined, and any statement describing it is unnecessary duplication. By default “1 is-a number” is true without storing this triple in a database.

All the other entities, the ones described and not predefined, are called resources.

Note that a resource can be either defined or described. For example, a person has physical existence but can be digitally described, while a PDF document is defined in the computer, because its whole existence is digital. But that doesn’t necessarily require special treatment: For example, what if we have two halves of a PDF document stored on different computers? Does either of them define thre document? No, each computer has half of the information, i.e. it cannot be a definition. Also, what if a third computer has more parts of the document, such as an External Links section? As you can see definitions and descriptions can get all mixed up. But predefined entities, called values here, are a different story.

[See repo JSON]