Please send your questions to the Neo4j google group or neo4j.com/slack.
In general, you should be able to get all the information from our public
information e.g. on neo4j.com/developer/cypher
In your case both departments and employees are nodes and the relationship
could be
(:Employee)-[:WORKS_IN]->(:Department)
Relationships in Neo4j are always many-to-many.
Please learn about Cypher and how you create and find data, e.g. with our
online course in neo4j.com/graphacademy
If your data is available as CSV, you can use
LOAD CSV WITH HEADERS FROM "departments.csv" AS row
CREATE (:Department {id:row.id, name:row.name});
LOAD CSV WITH HEADERS FROM "employees.csv" AS row
MATCH (d:Department {id:row.dept_id})
CREATE (e:Employee {id:row.id, name:row.name})
CREATE (e)-[:WORKS_AT]->(d);
M
On Tue, Dec 6, 2016 at 12:04 PM, <[email protected]> wrote:
> Hi,
>
> I am new to neo4j and not much aware about how to define relationship
> between two nodes. I have to develop relationship between two nodes and
> below are the structure and data that two nodes contains.
>
> Department Table
> ====================
> id name
> ====================
> 1 HR
> 2 Account
> 3 Developer
> 4 Management
>
> Employee Table
> ====================
> id name dept_id
> ====================
> 1 ABC 1
> 2 XYZ 2
> 3 PQR 3
> 4 DEF 1
> 5 MRF 3
> 6 BAT 2
>
> =====================================
>
> How to define one employee works for one department. How to define
> relationship for it. and also department have many employee in particular
> department.
>
>
>
> On Tuesday, July 21, 2015 at 3:35:51 PM UTC+5:30, Michael Hunger wrote:
>>
>> can non-DND be a label?
>>
>> Do you _need_ to pull out the phone ? Where do you use it in your
>> use-case.
>>
>> What do you need the "common" relationship for?
>>
>> Am 20.07.2015 um 11:44 schrieb Dharani Bodla <[email protected]>:
>>
>> I need a common relation ship between nodes from the below example.
>> Ex : Nodes
>> 1. circle -- INDIA.
>> 2. University -- delhi university.
>> 3. name -- kumar, dharani, coartha, syam.
>> 4. phone -- DND, DNDstatus.
>> 5. Education -- btech, mba etc.
>>
>> Out these circle node is common for all , so how do I create a
>> relationship between circle to other including other relationship as
>> mentioned below.
>>
>>
>>
>>
>> --
>> 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.
>>
>>
>>
--
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.