Describe your movie data model

In this lesson, you will learn how to describe your movie data model in Neo4j Aura and design dashboards that align with stakeholder requirements. This includes understanding the structure of your project, the relationships between different components, and the properties that define them.

By the end of this lesson, you should be able to:

  • Identify the key entities in your project

  • Describe the relationships between those entities

  • List the properties associated with each node and relationship

  • Understand the overall structure of your graph data

Understanding requirements

To draw a clear picture of your graph data model, consider the following questions:

  • What are the main node labels and relationship types in your data?

  • What properties do nodes and relationships have? (For example, movies have a title and release year, ratings have a score, etc.)

  • What insights do you want to gain from your data?

For example, the following structure can be used to describe the movie project:

  • Node labels:

    • Movie (The main entity representing films)

    • Actor (People who perform in movies)

    • Director (People who direct movies)

    • Genre (Categories that movies belong to)

    • User (People who rate and review movies)

  • Relationship types:

    • ACTED_IN (Actor, Movie)

    • DIRECTED (Director, Movie)

    • RATED (User, Movie)

  • Properties:

    • Movie: title, release_year, genre

    • Actor: name, birthdate

    • Director: name, birthdate

This can be also found in the graph model generated after you have imported the movie dataset into your Aura instance:

(Navigate to Imported Data > Graph Model in the Aura Dashboards console to view the graph model.)

Movie Graph Model

Analyzing movies project structure

Challenge:

You have been given a movie dataset and need to describe its data model. In your Aura instance, identify the key entities, relationships, and properties that define the structure of the movie project.

After analyzing the dataset, you should be able to build a dashboard for a streaming service executive:

Step 1: Identify stakeholders and their goals

Start asking questions to understand the stakeholders and their goals. For example:

  • Who is the audience for the dashboard?

  • What are the key metrics they want to track?

In this case, the stakeholders are streaming service executives, content acquisition team and marketing department, who want to track user engagement and content performance metrics, such as:

  • Genre trends over time.

  • Top-rated movies and actors.

  • Identify popular content for acquisition.

Step 2: Map requirements to data model components

Based on the stakeholders' goals, map the requirements to the data model components, by asking more specific questions:

  • What are the most popular genres?

    • Data needed: Movie nodes with genre property, and RATED relationships to User nodes.

  • Can the number of movies in each genre be counted?

    • Data needed: Movie nodes with genre property.

  • (Optional) Can a query pattern be defined to find top 10 rated movies per user?

In this scenario, you would need to query Movie nodes that are rated by each User node and find the top 10 rated movies for each user.

Go ahead and run this Cypher query in the dashboard’s card editor to get the results:

cypher
/* What are top 10 movies and users that have rated those movies? */

MATCH (u:User)-[r:RATED]->(m:Movie)
RETURN m.title AS movie, u.name AS user, r.rating AS rating
ORDER BY r.rating DESC
LIMIT 10
  • Which directors have the highest average movie ratings?

    • Data needed: Director nodes, DIRECTED relationships to Movie nodes, and RATED relationships.

Create a new card in your Stakeholder Dashboard and run this natural language prompt to get the results: 'Which directors have the highest average movie ratings?'

Click on Generate and choose the preferred visualization type to display the results, such as a pie chart or bar chart:

Directors with highest average movie ratings

Best practices for dashboard design

  • Analyse your data model before building dashboards

  • Understand your stakeholders' goals and requirements

  • Choose relevant metrics that align with business objectives

  • Be specific about the node and relationship labels

Check your understanding

Structure of your data model

Select the correct options that describe the components of your data model:

  • ✓ Properties

  • ✓ Relationships.

  • ❏ Instances.

  • ✓ Nodes.

Hint

Think about the hierarchy you learned about in the lesson. Which components are part of the structure?

Solution

The correct options that describe the structure components of your data model are: * Properties: These are key-value pairs that provide additional information about nodes and relationships. * Relationships: These define how nodes are connected to each other in the graph. * Nodes: These are the primary entities in the graph that represent data points.

Instances are not part of the data model structure; they refer to the database instances where the data is stored.

Summary

In this lesson, you learned about the graph project requirements and how to describe the key entities, relationships, and properties in your graph data.

In the next lesson, you will create your in-depth dashboard and configure it for your business needs in Neo4j Aura.

Chatbot

How can I help you today?