Hi dear community,

I was wondering if there were some good practices about how you modelize 
your graph when you have different kind of nodes (so differents labels) 
that have properties in common.
Let me explain with an example :

Let's say I have a node containing localization data (city, country, 
street, zipcode...) which is related to a "person" node.
I also have an other node, a "company", which have "countries" as a 
property.

I can see many kind of modelization :


   1. (person)-[:IS_LOCATED_IN]->(location {city:"", country:"france", 
   zipcode:""}), (company {countries: :["france", "USA"]})
   2. (person)-[:IS_LOCATED_IN]->(location {city:"", country:"france", 
   zipcode:""}), (company)-[whatever]->(country {name:"france"})
   3. (person)-[:IS_LOCATED_IN]->(location {city:"", 
   zipcode:""})-[whatever2]->(country {name:"france"})<-[whatever]-(company)

You will probably say that it depends on my needs, but I was just wondering 
if there was a rule like "When you have data in common, you'd better 
extract it to an other node and link them all to have a highely connected 
graph".

Considering my needs, my application is not specifically focused on 
localization, it is just some datas that could be share between nodes by 
extracting them to node and create relations.

This question came to my mind after seeing some "time representation model" 
like the GraphAware TimeTree.

   - Is there a best modelization between the 3 I suggest ?
   - Does it only depends on what will be the queries ?
   - What about global Neo4j performances and disk(or memory) usage between 
   those 3 ?
   - Do you have a better modelization ? :)

Thank you guyz

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to