Thinking in Triples
Entities, Relations & Triples
The atom: subject, predicate, object
Everything in a knowledge graph reduces to one shape: (subject, predicate, object) — (Marie Curie, DISCOVERED, polonium), (polonium, IS_A, chemical element). Subjects and objects are entities — nodes with identity. The predicate is the relation — the edge between them. Stack billions of these atoms and you get an encyclopedia you can traverse instead of just read.
Two kinds of values matter: things (people, companies, proteins — they get nodes and IDs) and literals (strings, numbers, dates — leaf values that terminate traversal). The classic modeling bug is storing a thing as a literal: 'Paris' the string can't participate in relations — it can't be CAPITAL_OF anything, can't be disambiguated from Paris, Texas, can't carry its own facts. If a value can be the subject of a sentence, it deserves a node.
insight
Nouns become nodes, adjectives become properties, verbs become edges. Catching yourself writing a verb as a property — `employer: 'Acme'` — means you probably wanted an edge.