Skip to main content

Graph Data Model

The graph data model is the foundation of Graphora’s knowledge representation. It allows you to model complex relationships between entities in a natural and intuitive way. This page explains the key components of the graph data model and how to work with them in the Graphora client library.

Core Components

The Graphora graph data model consists of two primary components:

Nodes

Represent entities in your domain, such as people, companies, or documents

Edges

Represent relationships between entities, such as employment or ownership

Nodes

Nodes (also called vertices) represent entities in your domain. Each node has:
  • A unique ID
  • One or more labels (entity types)
  • A set of properties (key-value pairs)
In the Graphora client library, nodes are represented by the Node class:

Edges

Edges (also called relationships) represent connections between nodes. Each edge has:
  • A unique ID
  • A type (relationship type)
  • Source and target node IDs
  • Optional properties (key-value pairs)
In the Graphora client library, edges are represented by the Edge class:

Working with Graph Data

The Graphora client library provides methods for retrieving and manipulating graph data:

Retrieving Graph Data

Modifying Graph Data

You can make changes to the graph by creating, updating, or deleting nodes and edges:

Graph Traversal and Analysis

While the Graphora client library doesn’t provide direct graph traversal capabilities, you can implement them using the retrieved graph data:

Graph Visualization

While the Graphora client library doesn’t include visualization capabilities, you can export the graph data to popular graph visualization libraries:

Best Practices for Working with Graph Data

To effectively work with graph data in Graphora:
  1. Use meaningful node IDs: Choose IDs that reflect the entity’s identity
  2. Keep node labels consistent: Align labels with your ontology entity types
  3. Structure properties carefully: Use consistent property names and types
  4. Batch graph modifications: Group related changes in a single update
  5. Handle large graphs efficiently: Use pagination for large graphs
  6. Consider graph partitioning: Organize data into logical subgraphs

Next Steps