Neo4j 如何找到不重叠的课程模块?
我不熟悉Neo4j 如何找到不重叠的课程模块?,neo4j,Neo4j,我不熟悉neo4j并尝试 Q1 - what are the modules both Computer Science and Applied IT have in common Q2 - what are the modules that are available in Computer Science but not Applied IT Q3 - what are the modules that are available in Applied IT but not Computer
neo4j
并尝试
Q1 - what are the modules both Computer Science and Applied IT have in common
Q2 - what are the modules that are available in Computer Science but not Applied IT
Q3 - what are the modules that are available in Applied IT but not Computer Science
假设:
Q2
和Q3
方面存在问题。如何找到不匹配的节点?在这种情况下,与计算机科学相比,它没有模块2
基本上,我想找到不重叠的模块。问题2:哪些模块在计算机科学中可用,但没有应用
MATCH (compSci:Course { name:"Computer Science" })-[:hasModule]->(m)
MATCH (applied:Course { name: "Applied IT" })
WHERE NOT ((applied)-[:hasModule]->(m))
RETURN m
问题3:在应用IT领域,哪些模块是可用的,而不是计算机科学
MATCH (applied:Course { name: "Applied IT" })-[:hasModule]->(m)
MATCH (compSci:Course { name:"Computer Science" })
WHERE NOT ((compSci)-[:hasModule]->(m))
RETURN m
示例图:另请参见Luane的组织学习图表: