In my system I have a relational DB table with "id" columns, and I am representing some of that same data in Neo4J.
My first approach is to make an "id" attribute in Neo which correlates to the id column.
Is there any reason that this isn't a good practice? Does it conflict technically or conceptually with the node IDs that Neo generates?
Neo4j has some upper bound limit for the graph size and can support tens of billions of nodes, properties, and relationships in a single graph. No security is provided at the data level and there is no data encryption. Security auditing is not available in Neo4j.
Heap Sizing The size of the available heap memory is an important aspect for the performance of Neo4j. Generally speaking, it is beneficial to configure a large enough heap space to sustain concurrent operations. For many setups, a heap size between 8G and 16G is large enough to run Neo4j reliably.
Relationships always has a direction (one direction). Relationships must have a type (one type) to define (classify) what type of relationship they are. Nodes and relationships can have properties (key-value pairs), which further describe them.
If the ids serve the purpose of uniquely distinguishing the nodes that will get generated then yes its good to have one.
But keep in mind the possibility that if your graph grows in future and say a situation arrives that another DB table needs to be modelled into graph and by any chance say some ids in the new DB table conflict with the old DB table then in that situation you will get into trouble maintaining uniqueness of node.
And node ids that neo4j generates are recommended not to be used as they are prone to be reused in case the nodes are deleted.
In case you just want to model the DB table into graph database and dont want to relate the graph data to your db table later on, you can use UUID.randomUUID().toString() to generate random unique UUIDs(extremely less probability of duplicate UUID) for ids of nodes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With