Every Curiosity-based system uses a custom graph-database technology in the back-end. This is a tailored-made graph database engine that has been designed from the ground-up for the enterprise search use-case, and powers much of the functionality of the system.

Data Modeling

Data in a graph database is represented as a set of Nodes and Edges. Nodes are actual data-points and represent things like documents, persons or concepts. In a Curiosity graph, all nodes are strongly-typed - i.e. they have a pre-defined type and fixed schema - imagine it as each entry on a typical SQL table. Edges represent the relationship between different nodes. Similarly to nodes, edges are also strongly-typed, and have a direction (i.e. they go from a node to another node).

Representation of nodes and edges in the graph

One edge always connects exactly two nodes in a single direction. To connect them in both directions, you need to add edges from each node to each other. Nodes can have multiple edges to any other node, but edges to itself are not allowed. Edges can also store information using fields.

Data Schema

Nodes and edges can have fields that describe data attributes, e.g. Harry could have properties like Age and Height. Fields are used to store information about nodes and edges.

// Node with properties

{
"UID": "MzmYCqZrjeddaquFAq4wwf",
"Type": "Person",
"Timestamp": "2020-07-17 17:27:29Z",
"EdgeCount": 123,
"Edges": [ ... ],
"Name": "Harry", //This is the Key of the schema Person
"Age": "28",
"Height": 1.82
}


// Edge with properties
{
"UID": "F4LADJqSppEM1tWUt2C6ke",
"Timestamp": "2020-07-17 17:45:37Z",
"Type": "AuthoredBy",
"ToType": "Person",
"To": "MzmYCqZrjeddaquFAq4wwf"
}

It is mandatory for a Node to have at least one string field (i.e. the Key of the node). This field will uniquely identify the pair (Node Type + Key) in the graph database.

Edges can have zero or more properties, and can be uniquely identified by the combination (Edge Type + Target Node Identifier). It is possible to have repeated edges of the same type between two nodes, so when adding relationships, you have to decide if you would like to add the edge and enforce uniqueness. When adding edges, the graph query language provides two methods: AddEdge and AddUniqueEdge. Edge uniqueness is enforced only when adding the unique edge. If you use AddEdge after a AddUniqueEdge, you could end up with duplicated edges.

Graph Schema

The graph schema is the structure that the administrator defines for your graph. It specifies:

  • Which nodes types and edge types exist in the graph
  • Which fields are associated with each node type and each edge type

The fact that the schema defines node fields means that all nodes of the same type share the same field types, e.g. each node of type Person has the field Name and Age, although the values of each field will usually differ between nodes. The same applies to edges.

You can configure your graph schema in the Data Schema settings page.

Protected Node Schemas

Every Curiosity knowledge graph contains a set of internal node types that are used to provide the out-of-the-box support for multiple functions in the system. A protected Node Type can be identified by a starting underscore in the node schema name (such as _FileEntry for representing files, or _Comment for comments).

Protected Node Types cannot be changed.

Did this answer your question?