I'm a noob in neo4j, and my question can look very simple.
I have CSV file, with next structure:
Id is a Persons ID, and Fam is a project ID, where this person took part. I want to connect persons if they worked on the same project.
What is the best data model in this case? First thing came into my mind is to make id - node, and Fam label. But I don't know how to load multiple labels to one node. Second is to make both id and Fam as nodes, and then make a query to show related employees.
For second case code will be like this:
LOAD CSV WITH HEADERS FROM 'file:///PNG20161202.csv' AS line
MERGE (n:id {Person_id: toInt(line.id)})
WITH line, n
MERGE (m:Fam {Fam_id: toInt(line.Fam)})
WITH m,n
MERGE (n)-[:WORK_IN]->(m);
But I don't know how to display only related id. (I need to export and visualize this network in Gephi, only id)
For the first case, I know how to make relations between id, but don't know how to write LOAD CSV query which will make id with multilabel.
Suggestions are very appreciated.