cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Transferring from MySQL Master Detail individual records to Neo4j nodes (denormalization)

Transferring from MySQL Master Detail individual records to Neo4j nodes (denormalization).

Would I still use a Master-Detail scenario?

2X_1_112cf4fd8458b86444138b5ea24bb73bbae8e140.png

2 REPLIES 2

If this is always a 1-1 correspondence between these, with them both representing the same entity, then it would make more sense to keep all the properties on a single node, and just have the application logic select the appropriate fields from the node depending on the level of detail.

The tradeoff here of course is that you wouldn't be able to tell at a glance from the db itself which fields are at what level of view, that logic lives at the application layer itself. On the plus side, you only need a single node for an entity, and you have flexibility in the query itself to decide which fields to include at which level of detail without having to alter the db.

@andrew.bowman Thank you, the connections are one-to-many.

Single Purchase quantity is reduced by MANY Usage quantities, thus ONE Invoice to MANY Usages relationship.

One article I found but does not share enough to grasp Master-Detail in Neo4j.
Titled: When and How You Should Denormalize a Relational Database

Am in the process of exporting my data to CSV then importing into Neo4j node database.
Am going to go through the example with Northwind to get an idea prior to importing my data.

Are generated columns handled differently in Cypher?
Default Expression for purchasetotal:
FORMAT(SUM(purchasepoints * purchasecost),2) total

Any suggestions greatly appreciated.

Thank you.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online