Describe your movie data model

In this lesson, you will learn to design dashboards that align with stakeholder requirements, including understanding the:

  • Data model

  • Project structure

  • Relationships between different components

  • 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 understand 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)/(Person, Movie)

    • DIRECTED (Director, Movie)/(Person, Movie)

    • RATED (User, Movie)

    • IN_GENRE (Movie, Genre)

  • Properties:

    • Movie: title, release_year, genre

    • Actor: name, birthdate

    • Director: name, birthdate

You can view this graph model structure by running CALL db.schema.visualization in the Query tool, which you used in the previous lesson to verify your data:

Movie Graph Model

Analyzing movies project structure

Challenge:

Using the movie dataset in your instance, analyze stakeholder requirements and map them to the data model components to design a dashboard for a streaming service executive:

Step 1: Identify stakeholders and their goals

Ask 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?

Consider the following use 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.

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.

When you create a dashboard in the next lesson, you can 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:

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

Understanding your movie data model structure

In your movie recommendation system, you want to visualize how actors are connected to movies. Which components of your graph data model enable you to create these visualizations?

  • ✓ Nodes (representing entities like Movie and Person)

  • ✓ Relationships (like ACTED_IN connecting Person to Movie)

  • ✓ Properties (like title on Movie nodes, name on Person nodes)

  • ❏ Instances (these are database containers, not model components)

Hint

A graph data model consists of nodes (entities like Movie, Person), relationships (connections like ACTED_IN), and properties (attributes like title, name). These components define what you can visualize in dashboards. Instances are where the data is stored, not part of the model structure.

Solution

The correct options are: * Nodes: Represent entities in your recommendation system (Movie nodes, Person nodes) * Relationships: Define connections between nodes (ACTED_IN connects actors to movies) * Properties: Provide attributes on nodes and relationships (title on Movie, name on Person, characters on ACTED_IN)

These components define your data model and determine what insights you can visualize in dashboards. Instances are database containers where your data is stored, not components of the data model structure.

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.

Chatbot

How can I help you today?