i have a csv file
name college
ABC clg1
BCD clg2
i want a relation from name->clg
how can i create that without using any nodes .
i have a csv file
name college
ABC clg1
BCD clg2
i want a relation from name->clg
how can i create that without using any nodes .
Impossible. Relationships can only connect nodes, they always have a start node and an end node, though it could be that they are the same node (a relationship from a node that points to itself).
In case I misunderstood, you might want to clarify what you're trying to do.
It may help to start out with an example based on your data. I'm guessing at what your data model might look like, but try these in an empty neo4j database. I used neo4j desktop to create an empty graph db.
// create the first relationship
create p=(:person {name:'ABC'})-[:ATTENDING]->(:college {name:'clg1'})
return p
// create the second relationship
create p=(:person {name:'BCD'})-[:ATTENDING]->(:college {name:'clg2'})
return p
// return all people and the college they are attending
match p=(a:person)-[:ATTENDING]->(b:college)
return p
// add another person 'me' ATTENDING clg2 (an existing college)
Match (b:college {name:'clg2'})
CREATE p=(a:person {name:'me'})-[:ATTENDING]->(b)
return p
// return all people and the college they are attending, again to see there are now two people attending clg2
match p=(a:person)-[:ATTENDING]->(b:college)
return p
notes