A graph database stores the connections as data
Most databases keep records in rows and columns, which suits structured data and handles relationships awkwardly. A graph database stores the connections between entities as data in their own right, each with a type and a direction, and that’s what lets a system follow chains of relationships through a knowledge graph.
Graph database
One-sentence definition: A graph database is a database that stores entities as nodes and the explicit, typed relationships between them as edges, enabling complex traversal1 queries and pattern matching across interconnected data.
A graph database is easy to confuse with a knowledge graph, and the two are worth keeping apart. A knowledge graph is a conceptual structure: entities connected by meaningful relationships. A graph database is the storage technology that makes that structure queryable and persistent. The knowledge graph is the map; the graph database is the filing system that holds it.
In a graph database, concepts are stored as nodes with properties, connected by directional, typed relationships. The database records that Theory A and Theory B exist, and also that Theory A critiques the assumptions of Theory B and that both build on Methodology X. The relationship type, direction, and properties are all explicit and searchable.
A relational database, the kind behind most student record systems, keeps entities in separate tables and rebuilds the relationships between them at query time by matching identifiers across tables. That works well for one or two steps and gets slower and harder to write with every step added. A graph database stores the relationship itself, so following a chain of five connections is the same kind of operation as following one.
Neo4j2 is the most widely used graph database, and its query language, Cypher3, is written for matching patterns and following paths through the graph. An MCP server gives a language model a standard way to query a graph database during a conversation.
Curriculum mapping with a graph database
The case for a graph database in health professions education is clearest in curriculum mapping. Suppose a quality assurance officer needs to confirm that a prescribing safety competency is adequately assessed across a programme. That means finding the learning outcomes that address the competency, the assessments that test those outcomes, and the modules those assessments sit in, and checking that no link in the chain is missing. Across a set of module handbooks that’s days of reading; in a graph database it’s one traversal outwards from the competency. The curriculum infrastructure essay takes the idea further and makes the graph the source of truth, with module specifications and accreditation evidence generated from it instead of being maintained as separate documents.
How it differs from a vector database
- A vector database stores content as numerical representations (embeddings) and retrieves by similarity. Ask “what is related to clinical assessment?” and it finds passages that appear in similar linguistic contexts. It answers: what is similar to this?
- A graph database stores content as entities with explicit connections and retrieves by traversal. Ask “which assessment methods address the validity concerns raised about OSCEs4?” and it follows paths: OSCEs → validity concerns → shared by → other methods. It answers: how are these things connected?
Following chains of connection like this is multi-hop reasoning, which needs explicit relationships to traverse. The knowledge graph note works through why similarity can’t stand in for them.
Sources
- Angles, R., & Gutierrez, C. (2008). Survey of graph database models. ACM Computing Surveys, 40(1), 1–39. https://doi.org/10.1145/1322432.1322433
Notes
Many systems use both kinds of database, with vector search for a first pass that finds similar material and a graph for reasoning about how the retrieved material connects. Which you need depends on the questions your application has to answer.
Footnotes
-
Traversal. Moving through a graph by following its edges from one node to the next, the way you’d trace a professional standard to the learning outcome that addresses it and then to the assessment that tests it. See Graph traversal. ↩
-
Neo4j. A graph database first released in 2007, available as open source and as a commercial product, and the one most tutorials and courses use. See Neo4j. ↩
-
Cypher. The query language used with Neo4j. A query is written as a small picture of the pattern you’re looking for, such as an outcome connected to an assessment, and the database returns every match. See Cypher (query language). ↩
-
OSCE. Objective structured clinical examination: a circuit of timed stations at which students carry out a clinical task, such as a medication history or a counselling conversation, while an examiner scores them against a checklist. See Objective structured clinical examination. ↩