NautilusGDB

General Information

GEO - Graph Evolution Operation

GEO is a domain-unspecific description of evolution operations for graph databases in general. This enables queries on graph databases without the knowledge of the query language. This advantage of GEO is that ordinary people as well as experts are able to use evolution operations to change their data without having to deal with a domain-specific query language.

GEO file published on Zenodo.

Graph Databases in General

Graph databases consist of nodes and relationships connection them to one another. A node can be imaged as a bubble of a mindmap. Nodes are categorized through labels, that also name them. To define how two nodes are connected relationships are used. These are named by types. Both nodes and relationships can inherit properties, giving further information about them. These can make them individual. -- add pic with student nodes with names

Nodes and relationships are entity types.
Labels, types and properties are called features.

Database Connection

These are the default values of the uri and user. If you did not change them during the installation process, use them to connect to your Neo4j Desktop application.

URI: bolt://localhost:7687
User: neo4j

Important Terms

Add picture and description of important terms here

Term I

Add Operation

As the name implies, the add operation is utilized to add additional information to the database. This includes entity types and features. To add more information to entities already present, you can add features to nodes like labels or properties while relationships can be expanded by properties only.

Add a node

This shows how your GEO will look like when your add a node entity to your database. The first parameter illustrates that a "add" operation is selected.

add node with label NewLabel

For the first field choose the evolution operation "add" to introduce a new feature or entity type. A node is an entity type, therefore, select entity type for the field "Type". After selecting the type choose "node". The "with" field gives you the option of choosing between a label, that will categorzie your node, and property, which adds additional information to your node. If you want your node to contain a label, type in your label, which will be displayed in GEO at the position of "NewLabel". In case, you want to add a property, you have two input fields that need to be filled out. First enter the name (also known as key). In the second field enter the value.

Add relationship
Add label(s)
add label NewLabel1, NewLabel2, ..., NewLabelN to node with label SelectLabel

To add a label, first select the "add" operation at the first position of GEO. Due to labels being categorized as feature, select "feature" for the type field. Now choose the "feature" label. There is the option of adding one or more labels. For more than one label just seperate the desired labels by commas. For example "NewLabel1, NewLabel2" will add both "NewLabel1" and "NewLabel2" to your node. To add one label, type in the name of the desired label. Then define the node you want to add your label(s) to. Therefore, that only nodes have labels, soly the option node will be selectable. Afterwards choose the label of the node to add the "NewLabel(s)" to. This will replace "SelectedLabel". Here only one label can be added.

Add a property
add property propertyName1, propertyName2, ..., propertyNameN with value(s): propertyValue1, propertyValue2, ..., propertyValueN

Besides labels you can also add properties. Choose the "add" operation and feature for the type field because properties are defined as features. Apart from a single property name and its value, adding multiple properties works analogous to multiple labels. Just seperate the keys and values by commas. All keys will be placed in the first text field while all values go in the second field.

Option 1: to node with label SelectLabel

Option 2: to relationship with type SelectType

Properties can be added to either nodes or relationships, therefore, there are two options to choose from. Option 1 shows how to add properties to nodes by selecting its label. Your text input will replace "SelectType". Option 2 illustrates the adding process for relationships. Here the type of the relationship to add the properties to needs to be defined. Analogous to Option 1, the defined type is shown by "SelectedType".

Rename Operation

Rename is only available for features, as they are incorporated by the associated entity type.

Features

All features can be renamed. To rename any feature, the old value as well as the new value have to be defined. For all of these operations chose "rename" as operation from the first drop-down menu.

Rename label

In order to rename a label, the old label has to be defined as well as the new name you want to rename this feature to. The part "of node with label SelectLabel" will be pre define with the same value specified for the first SelectLabel.

rename label SelectLabel of node with label SelectLabel to SelectLabel
Rename type

For renaming a type, the start and end node of the desired relationship have to be defined. GEO

rename type SelectType of relationship with start node labeled SelectLabel and end node labeled SelectLabel to SelectType
Rename property of node
rename property SelectPropertyName of node with label SelectLabel to SelectPropertyName
Rename property of relationship
rename property SelectPropertyName of relationship with type SelectType starting at node with label SelectLabel ending at node with label SelectLabel

Delete Operation

To remove entity types such as nodes or relationships or any features like labels or properties from the database, use the delete operation. Note that a type can not be deleted from a relationship because a type is required for a relationship to exist. Nodes on the other hands can exist without any labels.

Entity Types

Delete node(s)
delete node with label/ property SelectLabel/ SelectPropertyName

The GEO above demonstrates how to delete a node entity. Remember that this only works for nodes without relationships. If the node has relationships, use X......... add detach delete....... First select the delete operation. Due to nodes being defined as entity types, chose entity type for the type field. Afterwards, there are to options for the with-field, giving you the possibility to select the node to delete either by a property name or a label. Finally type in the label or property name you want to search for (this will replace: SelectLabel/SelectPropertyName).

Delete relationship(s)
delete relationship with type SelectType

There also is the option of deleting relationships. Remember that this only works for nodes without relationships. Again select the delete operation and chose entity type for the type field. Just like before, you can choose between a property name or a type to select which relationship you want to delete. Type in the desired type at SelectType.

Features

Only types can not be removed from the database. This is due to the structure of graph databases, in which a type is required for each relationship.

Delete label(s)
delete label LabelToDelete1, LabelToDelete2, ... LabelToDeleteN of node with label SelectLabel

In contrast to relationships, nodes can have no, one or multiple labels. Consequently one or more labels can be removed from node entities. After the delete operation, select feature for the type field and enter either one or more labels, that should be deleted. In case of removing multiple labels at once, they need to be seperated by commas (LabelToDelete1, LabelToDelete2).

Delete properties
delete property PropertyName1, PropertyName2, ... PropertyNameN of node/ relationship with label/ type SelectLabel/ SelectType

There is the possibility to delete properties for both nodes or relationships. To do so, select the feature property and define the property names or keys to delete. These will replace: PropertyName1, PropertyName2, ... PropertyNameN. In the same manner as before, multiple names are seperated by comma. After defining the property names, select if they belong to either nodes or relationships. Finally type in the label or type to select the desired entities.

Transform Operation

The transfrom operations enables you to change between entity types, meaning a node can be changed into a relationship and vice versa. This is only for specific patterns.

Entity Types

Transform node to relationship
The start node, middle node as well as the end node of the pattern need to be defined. The middle node then will undergo the transformation. Also, only one relationship between the start and middle, as well as the middle and end node are allowed. The following picture illustrates what patterns can be transformed:
transform-node
Transform relationship to node
To transform a relationship into a node, the start and end node of the pattern need to be defined. This is necessary to explicitly identify the pattern. Here two new relationships will be created which have to be specified upon using the operation. The ingoing relationship is the one pointing towards the while the outgoing relationship is pointing away from the newly created node.
transform-rel

Copy Operation

Entity Types

Copy node
copy node with label SelectLabel with/without relationships and remove property key(s): SelectPropertyKey1, SelectPropertyKey2, ...

Copy nodes will create duplicates of nodes with a specified label and offers multiple options:

  • Node can be either copied with or without their associated relationships.
  • The last input field makes it possible to directly remove propery keys from the copy. One or more property keys can be defined in this case.

The first option to copy a node with relationships, consequently illustrates a copy of relationships in combination with copying nodes. Copy relationships is not available on its own as we assume that relationships are specified for a specific pattern and therefore, creating a new relationship would be preferred by the user to specify the connection of two nodes.

Features

Copy labels

It is also possible to copy the labels of a selected node to another node with a different label.

copy label SelectLabel to node with label SelectLabel

Move Operation

In contrast to a copy operation, move consists of a copy and a remove operation.

Entity Types

Move node with associated relationships

Moving a node is only possible if it is connected to other nodes, otherwise there would be no need to move the node. Consequently, move node can also be seen as the move of a subgraph, consisting of a node and specific relationships. The following GEO shows, how the start nodes of such a pattern can be change/switched.

move node from current node with label label with label SelectLabel to start node with label SelectLabel
Move relationship

When moving a relationship, it is "extracted" from its old pattern and moved to a new pattern. This indicates that the relationship will become a new end and start node.

move relationship starting at node with label SelectLabel and ending at node with label SelectLabel with type SelectType to start node with label SelectLabel ending at node with label SelectLabel

First the old pattern has to be specified including the type of the relationship as well as its start and end nodes. Afterward the new pattern, to which the relationship will be moved, has to be defined.

Features

Move label
move label SelectLabel1, SelectLabel2, ... SelectLabelN to node with label SelectLabel
Move direction

As only relationships have a direction, this operation is only available for relationships. In contrast to move relationship, the relationship is ment to keep its start and end nodes. Merely the start node will be changed to the end node and the end node will become the start node.

move direction of relationship with type SelectType to start node with label SelectLabel ending at node with label SelectLabel

Split Operation

Entity Types

Split node(s)

To split entity types such as nodes, the property key to split at is necessary. The property keys will be ordered alphabetically. The operation results in twice as many nodes as there were originally, but with different parts of the property keys and their associated values.

split node with label SelectLabel at SelectPropertyKey