//匯入 csv
LOAD CSV WITH HEADERS FROM "file:///cu11.csv" AS line
//建立節點 (包含設立 property)
MERGE (name:姓名 {姓名: line.contactName,關係人: line.relationship_1,職稱:line.contactTitle,城市:line.city,國家:line.country})
MERGE (address:地址 {地址:line.address})
MERGE (phone:電話 {電話:line.phone})
//建立關聯
MERGE (name)-[:have_address]->(address)
MERGE (name)-[:have_phones]->(phone)
//依情境建立關聯
WITH name
MATCH (searched:姓名),(matched:姓名)
WHERE searched.姓名 = matched.關係人
MERGE (searched)-[r:relation]->(matched)