Skip to content
bolerio edited this page Jul 10, 2015 · 1 revision

It is important to make clear the distinction between typed values and atoms. In a sense, atoms and values represent two different and orthogonal aspects of the information content stored in a HG database. Atoms are the semantic entities that form the network structure inherent in the HyperGraph database, while values are simply typed data, that may be structured or not. The value of an atom can be changed or replaced with a value of a different type. Several atoms may share the same value. And, naturally, atoms may be added and removed from the database.

On the other hand, values are immutable entities. One can provisionally change an atom's value at run-time and HyperGraph has no control over that, but there are no predefined means to mutate a value in the database. It is important to preserve that convention when implementing application specific types and when working directly with the HGStore.

As noted above, the relationship between the set of atoms and the set of values in HyperGraph is many to one. That is, several atoms may share the same value, but a given atom has only one value, and to each value there corresponds at least one atom. This relationship is enforced by HyperGraph relying on proper implementations of the HGAtomType interface.

Clone this wiki locally