Neo4J Nodes vs. Link Entities

I am working on NEO4J examples found inside the Spring Data book.

 Nodes         - Product, Person, Order

 Relationships - (Order) Items (Product), (person) Reviewed (product)

I am developing my first Neo4J database and come to a situation where a review can be better used as a Node instead of a relationship.

so that the review can now have a relationship COVERS

 Review COVERED Order , Review COVERED Product 

This review will, in a sense, cover several COVERED relationships.

Any thoughts on creating a Node Entity vs Node binding? Neo4J seems very flexible ... if I change my mind, it seems I can change this later, right?

It seemed strange to repeat essentially the same review text between multiple nodes ... and instead save the computing space and create one node review

 Review Node Entity
   - String comments
   - int stars
+4
source share
1

, , , .

, REVIEW node , , .

(PERSON)-[:GIVEN]->(REVIEW)-[:COVERED]->(PRODUCT)

, , ( ). A?

REVIEW, PRODUCT A, type COVERED, PERSON node, , .

(PERSON)-[:REVIEWED]->(PRODUCT)

type REVIEWED, PRODUCT A PERSON node. comments stars .

, REVIEWED REVIEWED

+1

Source: https://habr.com/ru/post/1526286/


All Articles