Graph Databases
Compare two explicit candidate-access strategies
BOTIE
Examples, experiments and workspace controls
Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.
Try your own inputs
Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.
Context for this challenge
Choose DEPENDS_ON edges and count the teaching loop’s full scans for distinct starts. Keep the definition of this count visible.
A tiny answer can hide a scan of unrelated relationships.
Inspect the component calculation
Count full-scan candidate checks(
Relationships: Choose a relationship type(
Relationships: Read graph relationships(
Graph: Maintenance dependency graph
)
Relationship type: DEPENDS_ON
)
Starting IDs: Requested starting IDs
)Examples and results
- Maintenance dependency graph
Nodes and properties (3)
- P7 · Asset
- S1 · Asset
- P8 · Asset
- P7 to S1: DEPENDS_ON
- P8 to P7: DEPENDS_ON
Inspect the node and relationship records
{ "nodes": [ { "id": "P7", "kind": "Asset" }, { "id": "S1", "kind": "Asset" }, { "id": "P8", "kind": "Asset" } ], "edges": [ { "id": "d1", "source": "P7", "target": "S1", "type": "DEPENDS_ON" }, { "id": "d2", "source": "P8", "target": "P7", "type": "DEPENDS_ON" } ] }- Requested starting IDs
- 0P7
- Required result
2
- Maintenance dependency graph
Nodes and properties (3)
- P7 · Asset
- S1 · Asset
- P8 · Asset
- P7 to S1: DEPENDS_ON
- P8 to P7: DEPENDS_ON
Inspect the node and relationship records
{ "nodes": [ { "id": "P7", "kind": "Asset" }, { "id": "S1", "kind": "Asset" }, { "id": "P8", "kind": "Asset" } ], "edges": [ { "id": "d1", "source": "P7", "target": "S1", "type": "DEPENDS_ON" }, { "id": "d2", "source": "P8", "target": "P7", "type": "DEPENDS_ON" } ] }- Requested starting IDs
- 0P7
- 1P8
- Required result
4
Try a fresh construction
This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.
Stuck? Inspect a worked construction
The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.
Assumptions and test precision
These components operate on the supplied records in your browser. They do not run a graph database or interpret Cypher. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.
An isolated starting asset still costs a scan
This check uses the pieces from “Compare outgoing adjacency candidates”.
BOTIE
- Maintenance dependency graph
Nodes and properties (6)
- R1 · Asset
- R2 · Asset
- R3 · Asset
- R4 · Asset
- S1 · Asset
- S2 · Asset
- R1 to S1: DEPENDS_ON
- R1 to S2: DEPENDS_ON
- R2 to S1: DEPENDS_ON
- R3 to S1: DEPENDS_ON
- R3 to S2: DEPENDS_ON
- R4 to S2: NEAR
Inspect the node and relationship records
{ "nodes": [ { "id": "R1", "kind": "Asset" }, { "id": "R2", "kind": "Asset" }, { "id": "R3", "kind": "Asset" }, { "id": "R4", "kind": "Asset" }, { "id": "S1", "kind": "Asset" }, { "id": "S2", "kind": "Asset" } ], "edges": [ { "id": "a", "source": "R1", "target": "S1", "type": "DEPENDS_ON" }, { "id": "b", "source": "R1", "target": "S2", "type": "DEPENDS_ON" }, { "id": "c", "source": "R2", "target": "S1", "type": "DEPENDS_ON" }, { "id": "d", "source": "R3", "target": "S1", "type": "DEPENDS_ON" }, { "id": "e", "source": "R3", "target": "S2", "type": "DEPENDS_ON" }, { "id": "near", "source": "R4", "target": "S2", "type": "NEAR" } ] }- Requested starting IDs
- 0R1
- 1R4
- 2R1
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
What work is excluded from these counters, and what would you measure in a real query plan?
Keep operation counts, plan statistics and latency measurements distinct.
These components operate on the supplied records in your browser. They do not run a graph database or interpret Cypher.
Work through the Python challenges →