your knowledge, accessible

Day 3 of 6

Graphs vs. Relational Databases

Why traversal beats joins

Knowledge Graphs for AECO — a course for domain experts

Where we are going today

  1. Explain — without writing any SQL — why a multi-hop question in a relational database needs a chain of JOINs, and why that gets fragile.
  2. Describe querying a graph as "tracing a path along the edges", not as a programming skill.
  3. Explain why graphs stay flexible at enormous scale, using DBpedia as the reference point.
  4. Understand how AI removes the need for any domain expert to learn a query language.

How we are used to storing things

A relational database is a set of fixed tables with predefined columns

Every table has to be designed around the questions you expect to be asked.

"Which spaces are covered by this contract?"

Contract JOIN Project JOIN Building JOIN Storey JOIN Space

Five tables, four joins. Change the question slightly and the whole query has to be rewritten — by someone who knows the schema.

And if the answer spans a document management system, a BIM tool's database and a spreadsheet register?

Then there is no query at all. Somebody exports three files and cross-references them by hand.

Asking a graph instead

There is no fixed "shape" of the question

A query just describes a pattern to look for in the network — and the database walks the edges to find every match.

Fill in the blanks, and the graph finds the rest

Constant
A101
Edge to follow
adjacent to
Variable
?window

That is the whole idea of a graph query.

The Planner's question:

"Show me all windows adjacent to space A101"

Storey — contains → Space — adjacentTo → Window

Three hops along edges that already exist. No joins, no exports, no analyst.

Does this survive at scale?

These graphs can grow to unbelievable sizes.
consists of 9.5 billion triples!

HWZ at DBpedia
https://dbpedia.org/sparql

Nobody designed DBpedia for that question

Size is not the limiting factor. The shape of the question is what a relational schema struggles with — and what a graph handles natively.

Should I learn to write SPARQL queries?

No! The LLMs already know 😎

A translator doesn't require the traveller to learn the local language

This works if you know the graph schema but what if you don't?

GRASP Freiburg University

Examples of contextual questions

  • How many windows are there on the northern facade?
  • Where is the mixing plant that feeds this radiator?
  • When was this filter last replaced?
  • In what facilities do we use Company X for cleaning?

Your five-hop question

Planner

"Which parcels within 200 m of a transit stop are zoned mixed-use and have no active variance?"

Facility Manager

"Where is the mixing plant that feeds this radiator?" — a traversal through a services network.

Asset Owner

"In what facilities do we use Company X for cleaning?" — a cross-portfolio pattern match.

Exercise: "Trace the path"

No computer needed. Just a highlighter.

In groups, 20 minutes.

  1. Each group gets the printed graph of a small building — storeys, spaces, elements, people, documents, all connected by labelled arrows.
  2. Draw a question card, e.g. "Who is responsible for the door adjacent to Room 204?"
  3. Using only a highlighter, trace the path of edges from the question's starting point to its answer.

Debrief

"What would this have taken in a spreadsheet?"

Then: how many of you needed to know the schema before you started?

Key takeaway

"I don't need to know the schema in advance to ask a new question — the graph doesn't care what question you thought of when you built it."

Tomorrow

If the graph doesn't need a big schema up front — how small can a schema for describing a building actually be?

Day 4 — The Building Topology Ontology (BOT)