Additional Topics - circles-arrows/compare41 GitHub Wiki
A Key is a unique identifier for an Entity, that can be either a Node Type or a Relationship Type.
Note
Keys are case-sensitive.
Natural keys are meaningful values in your actual data that uniquely identify a node, such as a person's name or social security number.
Note
Natural keys are not auto-generated and often are composed of multiple fields. Field names are usually not shared between entity types, although this is not always the case.
A surrogate key is an added attribute that does not exist in the real world to uniquely identify a node.
Note
Surrogate keys are auto-generated values like guid or typically auto-incremented id (functional keys) and often use the same field name for all entity types (e.g. guid, id, uuid).
Composite keys are combinations of properties that can uniquely identify a node. Usually, natural keys are used to define composite keys.
For example: name+born
You can define composite keys by separating them with the plus (+) sign, comma (,), colon (:), or semicolon (;).
In some cases, certain node- or relationship-types may not have keys defined, it's necessary to manually set them within the Compare41 application.
If the key's property name is the same for all node types or relationship types, you can efficiently establish default keys for them in the Default Keys panel. This way, you won't need to individually set each key for every node or relationship type through the Properties panel.
You have the flexibility to mix both keys defined in the Default Keys panel and those set in the Properties panel.
If you are wondering why some keys are not applied as default keys on entities, it’s because the default Keys will be applied based on the first keys found for an entity on the Default Keys list.
For example, we want to have default keys for entities that have the 2 properties: title
and released
both set as 2 separate default keys. When we add the composite key title+released
as an additional, 3rd default key, it has no effect because there is already a title
default key in the default key-list higher in ranking of the list.
By removing the title
from the Default Keys list, the composite title+released
default key will take effect.
Another reason keys might not be working as expected is due to misconfiguration or the absence of unique or distinct values. When keys are configured incorrectly and do not possess unique values, the system may fail to recognize them properly. This issue becomes evident during the scanning phase, where an error message will typically indicate the problem.
To address this, ensure that each key is configured correctly and that it represents a distinct value within the dataset. Verify that the keys you're using are unique identifiers for the entities they are meant to represent. If necessary, revise the key configuration to ensure uniqueness and accuracy, which will enable smoother processing and accurate results during data comparison and analysis.