Professional Documents
Culture Documents
20MIA1002 NoSQL Lab 11
20MIA1002 NoSQL Lab 11
LAB ASSIGNMENT – 11
create (p1:Person{name: "Micheal"}),(p2:Person{name: "Jennifer"}), (p3:Company{name:"
Neo4j"}),(p4:Technology {type:"Graphs"})
Q2) Display the details of students who have registered NoSQL in c1 slot under
faculty “ABC”. Display the details of students who have registered NoSQL in
c2 slot under faculty “XYZ”. Design the appropriate graph to display the result
for the above queries. Make sure to use properties in nodes and relationships.
create (s1:Student{name:"alan"}),(s2:Student{name:"bob"}),(s3:Student{name:"clerk"}),(s4:
Student{name:"dave"}),(t1:Teacher{name:"abc"}),(t2:Teacher{name:"xyz"})
match (a:Teacher),(b:Student) where a.name = 'abc' and b.name = 'alan' create (b)-
[:Register{slot:'c1'}]->(a)
match (a:Teacher),(b:Student) where a.name = 'abc' and b.name = 'bob' create (b)-
[:Register{slot:'c2'}]->(a)
match (a:Teacher),(b:Student) where a.name = 'xyz' and b.name = 'dave' create (b)-
[:Register{slot:'c2'}]->(a)
match (a:Teacher),(b:Student) where a.name = 'xyz' and b.name = 'clerk' create (b)-
[:Register{slot:'c1'}]->(a)
match(n) return n