toro4n Open toro4n

Guide Nodes and relationships

Nodes and relationships

In toro4n you draw the schema of your graph: the node labels, the relationship types that connect them, and the properties on both. A node can carry several labels, such as :Router:Egress.

Adding nodes

A new model starts with one empty node in the middle of the canvas. To add more, click Add node at the top of the side panel, or right-click an empty spot on the canvas and choose Add node to place one there. Each new node opens with boxes for its labels and properties, so you can start typing right away.

You can also paste a list of names to create many nodes at once (see Import and merge).

Labels and naming conventions

Labels appear above the node. Since you're modeling a schema, each node needs a unique label or combination of labels. If you give a node labels that another node already has, toro4n tells you so and highlights both nodes in red until you change the labels on one of them. The same goes for a duplicated or pasted node, which keeps the original's labels. Labels that differ only in case, such as OrderItem and Orderitem, count as the same label, even though Neo4j treats them as distinct.

toro4n follows the naming conventions in the Cypher manual: labels in PascalCase (Person, NetworkSwitch), relationship types in UPPER_SNAKE_CASE (ACTED_IN), and property keys in camelCase (firstName). As you type, we format each name to match and leave acronyms alone, as in USB and IPAddress. Spaces, underscores, and hyphens stay as they are. When you open or import a model, its names stay as written. After an import, a notice offers to convert any that differ, and you can review every change first.

Captions

The text inside a node is its caption: the example value of its top property. To show a different caption, drag the property you want to the top of the list. If the top property has no example, the node is blank inside, as it usually is in a schema without example values.

Relationships

To create a relationship, drag from the edge of a node to another node. Fill in the Type box that opens above the line, and press Enter. To create a new node at the same time, drop the relationship on an empty spot instead.

Editing on the canvas

To edit a node or relationship, double-click it (or tap it on a tablet), or select it and press Enter. On a node, a labels box opens above it and a properties box below it. On a relationship, a Type box and a properties box open. Press Tab to move to the next field, and click the canvas when you're done. The same fields are in the side panel's Edit tab.

Circles or cards

By default, a node is a circle, with its labels above it and its properties listed below. Turn on Square mode in the top bar to show every node as a card instead. The labels run across the top in bold, the caption sits in a band of the node's fill color, and the properties fill the card in three columns: key, type, and example. Square mode applies to the whole model. To show only labels and captions, hide the Properties layer. To edit a card, double-click it and type right inside it.

Selecting and moving

Click to select. Shift-click or ⌘-click to add an item to the selection, or to remove it. To select everything in an area, ⌘-drag across it, starting from an empty spot on the canvas. (On Windows and Linux, use Ctrl instead of ⌘.) Drag any selected item to move the whole selection, or nudge it with the arrow keys: 1 px at a time, or 10 px with Shift. If you drop a node on top of another, the node you dropped slides aside to make room. When the two are connected, it leaves just enough space for the relationship's type and properties.

To add a node that's similar to one you already have, select it and use Duplicate (⌘D). The copy has the same labels, properties, and relationships as the original, including relationships to nodes you didn't duplicate.

Related