✦ DeityDB
Browse Graph Connections Timeline Lineages Path Map Queries About Collaborate API GitHub ↗

Trace a reception chain

Follow how a divine figure was received and transformed across traditions. Enter any part of an entity name to trace its transmission history.
  • Matar → Phrygian Matar Kubileya → Greek Cybele → Roman Magna Mater
  • Lugus → Gaulish Lugus → Irish Lugh → Welsh Lleu Llaw Gyffes
  • Osiris → Egyptian Osiris → Ptolemaic Serapis → Christian parallels
  • Moses → Israelite Moses → Islamic Musa
  • Tiamat → Mesopotamian chaos → Canaanite Lotan → Israelite Leviathan
Follows reception_of and received_as links up to 8 hops.

Custom SQL query (hide)

WITH RECURSIVE chain(
  subject_id, object_id,
  subject_name, subject_tradition,
  object_name, object_tradition,
  rel_type, confidence, depth
) AS (
  SELECT
    r.subject_entity_id, r.object_entity_id,
    s.canonical_name, s.tradition,
    o.canonical_name, o.tradition,
    r.relationship_type, r.confidence, 1
  FROM entity_relationships r
  JOIN entities s ON s.entity_id = r.subject_entity_id
  JOIN entities o ON o.entity_id = r.object_entity_id
  WHERE length(coalesce(:entity_name, '')) >= 2
    AND r.relationship_type IN ('reception_of', 'received_as')
    AND (s.canonical_name LIKE '%' || :entity_name || '%'
         OR o.canonical_name LIKE '%' || :entity_name || '%')
  UNION ALL
  SELECT
    r.subject_entity_id, r.object_entity_id,
    s.canonical_name, s.tradition,
    o.canonical_name, o.tradition,
    r.relationship_type, r.confidence, c.depth + 1
  FROM entity_relationships r
  JOIN entities s ON s.entity_id = r.subject_entity_id
  JOIN entities o ON o.entity_id = r.object_entity_id
  JOIN chain c ON c.object_id = r.subject_entity_id
  WHERE r.relationship_type IN ('reception_of', 'received_as')
    AND c.depth < 8
)
SELECT DISTINCT
  subject_name, subject_tradition,
  rel_type AS relationship,
  object_name, object_tradition,
  confidence, depth
FROM chain
ORDER BY depth, subject_tradition

Query parameters

Edit SQL

0 results

Powered by Datasette · Queries took 1.388ms