Homework 5

.docx

School

Northeastern University *

*We aren’t endorsed by this school

Course

7275

Subject

Industrial Engineering

Date

Apr 3, 2024

Type

docx

Pages

19

Uploaded by BailiffRoseWaterBuffalo94 on coursehero.com

Homework 5 IE 6700 Data Management for Analytics Group 13 Student 1: Samiksha Baraskar baraskar.s@northeastern.edu Student 2: Dinesh Chalicheemala chalicheemala.d@northeastern.edu Problem 1 : Chapter 11 (11.3E) Using the Neo4j book club database in this chapter, can you do the following using Cypher queries? a. Find a list of books no-one likes. ANS: MATCH (b:Books) WHERE NOT (b)-[:LIKES]-() RETURN b; b. Find all pairs of people that have no liked books in common. ANS:
MATCH (r1:Reader), (r2:Reader) WHERE NOT (r1)--(:Book)--(r2) AND NOT r1.name = r2.name RETURN r1.name, r2.name
c. Find the genre with the most liked books. ANS: MATCH (g:Genre)--(b:Book)-[z:LIKES]-(r:Reader) RETURN g.name, COUNT(z) ORDER BY COUNT(z) DESC
d. Find the person who has the most likes in common with a given, another person. ANS: MATCH (r1:Reader)--(b:Book)--(r2:Reader) RETURN r1.name, r2.name, COUNT(b) ORDER BY COUNT(b) DESC
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help