Data modeling

The data model is the is the blueprint for the database. It defines how the data is organized and is the key to create a graph from your flat files. The data model is what you map your flat files to. It consists of nodes and relationships. Nodes need to have a label and one or more properties. Relationships need to have a type and one or more properties.

The data model panel is located in the center of the screen. It has buttons for collapsing the files panel, adding a node, discarding elements, previewing, running an import, and a more options button.

model panel

Workflow

The most efficient way to create your model is to complete the mapping of each element, ie. select source file, IDs, and properties, before moving on to the next element. Being familiar with your files is essential to creating a good model. See the section on Mapping for more information.

Create a node

To create a node, click the Add Node button. The button is located in the top left corner of the data model panel. As mentioned previously, the node needs a label and one or more properties. The label can be typed directly on the node or in the Label field in the details panel, to the right of the model panel. The conventional way of labeling is to use CamelCase, see Cypher® Manual → Recommendations for more information on labeling.

In addition to a label, the node needs to be mapped to a file, which is done in the field File, below the lable field, in the details panel. The mapping is not necessary to create the node, nor is adding properties, but both need to be done before the import can be run. See Mapping for more information on mapping.

Create a relationship

To create a relationship, it is necessary to have at least one node already. If you hover over a selected node, a grey circle with a green plus sign appear on top of the blue cirlce.

node relationship

The plus sign can be dragged to an empty space on the canvas and once released, a new node is created with a relationship to the first node. However, if you already have two nodes, you can just drag the plus sign from one node to the other and a relationship is created.

You can type directly on a selected relationship to specify the relationship type. This can be done in the details panel as well. The casing convention for relationship types is upper-case SNAKE_CASE, see Cypher Manual → Recommendations for more information.

The relationship needs to be mapped to a file and have at least one property, but again, this is not necessary to create the relationship. The section on Mapping covers this.

A relationship always has a direction, and if needed, you can reverse the direction in your model with a button, as shown below.

relationship

Deleting elements

Elements can be deleted from the model by selecting them and either clicking the trash icon, or using the delete key on your keyboard. You can select all elements with +a on Mac or Ctrl+a on Windows and delete them all at once.

Alternatively, you can use the lasso-tool to select multiple elements at once.