首页 > > 详细

辅导Data Management and Analysis Assignment 3

Data Management and Analysis
Assignment 3
Due Date: 20 − 04 − 2022
Consider the movie Database in Neo4J. Write graph queries for the following.
Submit your queries in a file with the extension .cypher
1. For all the movies that have been reviewed, retrieve the rating and the
director(s) of the movie.
2. For every person, display the name and the list of movies that person
has directed (if the movie(s) exist)
3. Two actors are said to be ‘co-workers’ if they have acted in some common
movie. Display the co-workers of Tom Hanks along with the title
of the movie in which they have acted in common.
4. In the previous query, some actors have acted in multiple movies with
Tom Hanks (Ex. Meg Ryan) . Modify the query such that, for every
co-worker of Tom Hanks, display the list of movies that they have acted
in common (so that every co-worker appears exactly once).
5. Retrieve pairs of all co-workers in the database. Display the pair actor
names as a list along with the list of the title of the movie(s) in which
both have acted.
6. In the previous query, if
["Hugo Weaving", "Emil Eifrem"] | ["The Matrix"]
is an output, then the following is also an output:
[ "Emil Eifrem", "Hugo Weaving"] | ["The Matrix"]
Modify the query to remove this redundancy (you should display only
one of the two tuples in the above form)
1
7. For every node of the type Person, if born information is available.
then add a new property called Current Age and set its value to the
current age of the person.
8. For every node of the type Person, add a new property called Num movies acted
and set its value to the number of movies in which the person has acted.
Set the value to 0 if the person has not acted in any movie.
9. For each person, display the name and if the person is a reviewer,
display the list of movies reviewed by that person.
10. For every movie, display the number of actors acted in the movie and
the number of directors of the movie.
 

联系我们 - QQ: 99515681 微信:codinghelp
© 2021 www.7daixie.com
程序辅导网!