Skip to content
Snippets Groups Projects
Commit 832eca09 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC: Some wording changed, and formatting.

parent d6089a81
No related branches found
No related tags found
1 merge request!22DOC: Update and extend importance and inheritance
# CaosDB Data Model # CaosDB Data Model
The data structure is build from some basic building blocks which are The data structure is built from some basic building blocks which are
shown in the following picture: shown in the following picture:
![entities](entities.png) ![entities](entities.png)
...@@ -29,8 +29,8 @@ class defined by its Record Type. These classes can contain Abstract ...@@ -29,8 +29,8 @@ class defined by its Record Type. These classes can contain Abstract
Properties which define key-value relationships for properties of the Properties which define key-value relationships for properties of the
things along with the expected data type and possibly the default things along with the expected data type and possibly the default
unit, a default value, or a range of permitted values. As files on the unit, a default value, or a range of permitted values. As files on the
back-end file system are a major focus of this database management backend file system are a major focus of this database management
system, there is a special entity File that encapsulates typical file system, there is a special File entity that encapsulates typical file
properties like path, size and checksum. properties like path, size and checksum.
## Entities ## Entities
...@@ -49,8 +49,8 @@ Each Entity has a list of Entity Properties, or in short just ...@@ -49,8 +49,8 @@ Each Entity has a list of Entity Properties, or in short just
triple of an Abstract Property, a value or Null, and an triple of an Abstract Property, a value or Null, and an
Importance. The values can be numerals, strings, dates, any other Importance. The values can be numerals, strings, dates, any other
valid value that fits into one of several builtin data types, or, most valid value that fits into one of several builtin data types, or, most
notably, references to other Entities. The importance is either notably, references to other Entities. The Importance is either
*obligatory*, *recommended*, *suggested*, or *fix*. A valid child of `obligatory`, `recommended`, `suggested`, or `fix`. A valid child of
an Entity implicitly inherits its parent’s Properties according to an Entity implicitly inherits its parent’s Properties according to
their Importance, which means that it is obliged, recommended or only their Importance, which means that it is obliged, recommended or only
suggested to have a Property with the same Abstract Property (or any suggested to have a Property with the same Abstract Property (or any
...@@ -58,7 +58,7 @@ subtype thereof). As opposed to Properties with other priorities, ...@@ -58,7 +58,7 @@ subtype thereof). As opposed to Properties with other priorities,
**Fixed Properties** have no effect on the Entity’s children. **Fixed Properties** have no effect on the Entity’s children.
During the creation or update of Entities, the importances of the During the creation or update of Entities, the importances of the
parents are being checked by the Server. Missing obligatory Properties parents are checked by the server. Missing obligatory Properties
invalidate the transaction and result in an error, by default. Missing invalidate the transaction and result in an error, by default. Missing
Properties, when they are recommended, result in a warning, but the Properties, when they are recommended, result in a warning, but the
transaction is considered valid. Entities with missing suggested transaction is considered valid. Entities with missing suggested
......
.. note :: # Note #
This document has not been updated for a long time. Although it is concerned with the mostly > This document has not been updated for a long time. Although it is concerned with the mostly
stable API, its content may no longer reflect the actual CaosDB behavior. > stable API, its content may no longer reflect the actual CaosDB behavior.
# AbstractProperty Specification # AbstractProperty Specification
......
...@@ -4,12 +4,12 @@ RecordType ...@@ -4,12 +4,12 @@ RecordType
Overview Overview
-------- --------
RecordTypes function as templates for :doc:`Records <Record>`. They RecordTypes act as templates for :doc:`Records <Record>`. They
provide a description for a type of Record and define which provide a description for a type of Record and define which
:doc:`Properties <AbstractProperty>` could, should, or must be :doc:`Properties <AbstractProperty>` could, should, or must be
present. Properties come with an `importance` attribute which tells present. Properties come with an `importance` attribute which tells
the user or client program how strongly necessary the Property is. (As the user or client program how strongly necessary the Property is. (As
all other entities,) RecordTypes can be inherited from other all other entities,) RecordTypes can inherit from other
RecordTypes (or any Entities). When RecordTypes inherit from other RecordTypes (or any Entities). When RecordTypes inherit from other
RecordTypes, the `inheritance` flag tells which properties shall be RecordTypes, the `inheritance` flag tells which properties shall be
inherited from the parents to the children. inherited from the parents to the children.
...@@ -17,8 +17,8 @@ inherited from the parents to the children. ...@@ -17,8 +17,8 @@ inherited from the parents to the children.
Importance Importance
~~~~~~~~~~ ~~~~~~~~~~
The importance value of a Property states whether it may, should, or The `importance` value of a Property states whether it may, should, or
has to be present in all children of this Entity. The table below must be present in all children of this Entity. The table below
lists the possible importances, together with the default behavior of lists the possible importances, together with the default behavior of
the server when the property is not present in a child. the server when the property is not present in a child.
...@@ -45,19 +45,17 @@ the server when the property is not present in a child. ...@@ -45,19 +45,17 @@ the server when the property is not present in a child.
- Property is not present in any child - Property is not present in any child
- --- - ---
The default behavior can be overridden for individual transaction by The default behavior can be overridden for individual transaction by setting the
setting the `force-missing-obligatory` flag to `ERROR`, `WARN`, or `force-missing-obligatory` flag to ``ERROR`` (the default), ``WARN``, or ``IGNORE``. These flags
`IGNORE`, in which case a transaction that would lead to an entity cause a transaction that would result in an entity with a missing `obligatory` property to return an
without (at least) an obligatory property causes an error, is executed error, a warning, or to execute without a warning, respectively. The importance value ``FIX`` is
with a warning, or is executed without a warning, respectively. The used for properties that are specific to the Entity itself and is explained below.
importance value ``FIX`` is used for properties that are specific to
the Entity itself and is explained below.
.. note:: .. note::
Note that in contrast to RecordTypes, all properties of a Note that in contrast to RecordTypes, all properties of a
:doc:`Record` have importance ``FIX`` since in general, even in the :doc:`Record` have the importance ``FIX`` since in general, even in the
rare case of a Record having children, its properties are not case of a Record having children, its properties are not
inherited. inherited.
Inheritance Inheritance
...@@ -74,23 +72,23 @@ child. ...@@ -74,23 +72,23 @@ child.
* - Inheritance * - Inheritance
- Meaning - Meaning
* - `None` (default) * - `None` (default)
- Nothing is being inherited - Nothing is inherited
* - ``OBLIGATORY`` * - ``OBLIGATORY``
- Properties of importance ``OBLIGATORY`` and above - Properties of importance ``OBLIGATORY`` and above
* - ``RECOMMENDED`` * - ``RECOMMENDED``
- Properties of importance ``RECOMMENDED`` and above - Properties of importance ``RECOMMENDED`` and above
* - ``SUGGESTED`` * - ``SUGGESTED``
- Properteis of importance ``SUGGESTED`` and above - Properties of importance ``SUGGESTED`` and above
* - ``ALL`` * - ``ALL``
- Copy everything from the parent. - Copy everything from the parent.
Note that inheritance ``All`` is essentially the same as ``SUGGESTED`` Note that inheritance ``ALL`` is essentially the same as ``SUGGESTED``
right now, but this behavior might change in the future. Also note right now, but this behavior might change in the future. Also note
that properties of importance ``FIX`` are never inherited this that properties of importance ``FIX`` are never inherited this
way. This is precisely what this importance level is meant for: way. This is precisely what this importance level is meant for:
properties that are specific to the parent entity and are not properties that are specific to the parent entity and are not
inherited by default. You can still add this property to the child inherited by default. You can still add this property to the child
manually if you wish to, though, but this is not covered by the manually if you wish, though, but this is not covered by the
automatic inheritance. automatic inheritance.
.. note:: .. note::
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment