[{"id":"neo4jintermediate-001","courseId":"neo4j-intermediate","domain":"graph-modeling","topic":"Specific relationship types","prompt":"A model links every actor to every movie with one generic relationship named CONNECTED_TO. A teammate asks why the guide prefers names such as ACTED_IN. What is the main reason?","hint":"Think about what the database has to examine when a query follows relationships.","explain":"Every relationship carries a type, and a query can name the types it wants to follow. The type you choose decides how much of the graph a search has to examine.","source":"https://neo4j.com/docs/getting-started/data-modeling/guide-data-modeling/","interaction":{"type":"single"},"options":[{"id":"a","text":"It makes the relationship hold a list of roles instead of one value.","whyNot":"Storing roles is a property decision; a specific type name is about which connections a query can follow."},{"id":"b","text":"It lets Neo4j traverse only the connections relevant to the query.","why":"Specific names let a query follow only the relevant connections, so the irrelevant ones are skipped."},{"id":"c","text":"It stops the relationship from being matched in reverse.","whyNot":"Direction comes from the pattern and the stored arrow, not from how specific the type name is."},{"id":"d","text":"It is required, because Neo4j rejects any relationship type that is generic.","whyNot":"The guide recommends specific names as good practice; it does not say generic names are rejected."}],"answer":"b","explanation":"Relationship types are used to match patterns, so specific names let a query follow only the connections that matter, instead of scanning generic ones.","concept":"Relationship types are used to match patterns, so specific names let a query follow only the connections that matter, instead of scanning generic ones.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Name relationship types after the specific connection, such as ACTED_IN, not a generic CONNECTED_TO."]},{"id":"neo4jintermediate-002","courseId":"neo4j-intermediate","domain":"graph-modeling","topic":"Separating users from actors","prompt":"Storing users as their own kind of node, separate from Person nodes, is the approach the guide advises, because users relate to Movie nodes differently.","hint":"Think about how a user's links to movies differ from an actor's links.","explain":"A label classifies a node by what it is, and a relationship records how it connects to other nodes. Ask whether two groups that look alike connect to the rest of the graph in the same way.","source":"https://neo4j.com/docs/getting-started/data-modeling/guide-data-modeling/","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","why":"The guide notes it is possible to use Person nodes, but advises separating users because they relate to Movie nodes differently."},{"id":"b","text":"False","whyNot":"The guide does advise separating them: users relate to Movie nodes differently from actors and directors."}],"answer":"a","explanation":"Nodes that look alike can relate to other nodes differently; the guide keeps users apart from actors and directors because of how they connect to movies.","concept":"Nodes that look alike can relate to other nodes differently; the guide keeps users apart from actors and directors because of how they connect to movies.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Give a group its own node kind when its links to the central entities differ from other groups."]},{"id":"neo4jintermediate-003","courseId":"neo4j-intermediate","domain":"graph-modeling","topic":"Relationships as verbs","prompt":"A use case asks, 'Which person directed a movie?' Following the idea that connections are verbs, how should the link between a director and a movie be modeled?","hint":"Each relationship type should name the action the question asks about.","explain":"A graph stores who did what as a link between two things, and the name of that link can read like an action. The link should be specific enough that a query can ask for exactly that action.","source":"https://neo4j.com/docs/getting-started/data-modeling/tutorial-data-modeling/","interaction":{"type":"single"},"options":[{"id":"a","text":"A DIRECTED relationship from the Person node to the Movie node.","why":"The verb in the question becomes the relationship type, and the link runs from the person to the movie."},{"id":"b","text":"A RATED relationship from the Movie node to the Person node.","whyNot":"RATED names a different action, and it runs the wrong way for this question."},{"id":"c","text":"A CONNECTED_TO relationship with no direction at all.","whyNot":"The guide says all relationships must have a direction, and a generic name hides what the link means."},{"id":"d","text":"An untyped relationship from the Person node to the Movie node.","whyNot":"Every relationship needs a type, and the guide names relationships by their action, such as ACTED_IN and DIRECTED."}],"answer":"a","explanation":"In this model, relationships are the verbs of the use cases: the type names the action, and the link runs from the actor to the thing acted upon.","concept":"In this model, relationships are the verbs of the use cases: the type names the action, and the link runs from the actor to the thing acted upon.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Read each use case as a sentence; its verb usually becomes the relationship type."]},{"id":"neo4jintermediate-004","courseId":"neo4j-intermediate","domain":"graph-modeling","topic":"Use-case questions as a starting point","prompt":"You have just loaded a small set of test data into a new model. What is the main purpose of running a test query for each use case the application needs?","hint":"Think about what should be confirmed right after the data is loaded.","explain":"Designs are checked once data has been loaded, because a plan on paper can hide problems. A query can also be written wrongly, which would make a sound design look broken.","source":"https://neo4j.com/docs/getting-started/data-modeling/tutorial-data-modeling/","interaction":{"type":"single"},"options":[{"id":"a","text":"To prove the model is final, so no refactoring will ever be needed.","whyNot":"The tutorial calls refactoring the next step after testing, so a tested model is not necessarily final."},{"id":"b","text":"To choose the storage size of the database files on disk.","whyNot":"The tests check whether the queries satisfy the use cases, not how much disk space the files take."},{"id":"c","text":"To confirm the model answers every use case the application needs.","why":"Running each use-case query on the loaded data shows whether the model satisfies what the application needs."},{"id":"d","text":"To replace the unique identifiers with automatically generated IDs.","whyNot":"Unique identifiers come from the data itself, such as tmdbID; the tests do not swap them for generated values."}],"answer":"c","explanation":"The tutorial tests the model after populating the graph, running each use case's query to check that the model satisfies it before any refactoring.","concept":"The tutorial tests the model after populating the graph, running each use case's query to check that the model satisfies it before any refactoring.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Run each use-case query on loaded data; a badly written query can make a sound model look broken."]},{"id":"neo4jintermediate-005","courseId":"neo4j-intermediate","domain":"graph-modeling","topic":"Queries written before the model","prompt":"Your app must often return movies released within a chosen date range. The model stores release dates as a property on each Movie node. What does the modeling tips guide suggest?","hint":"Start from the queries you need to run, not from the data you already have.","explain":"Design begins with the questions you will ask, not with the data you already have. How a value is stored decides how cheaply a query can reach it.","source":"https://neo4j.com/docs/getting-started/data-modeling/modeling-tips/","interaction":{"type":"single"},"options":[{"id":"a","text":"Keep the property, since the model is flexible and can change later.","whyNot":"Flexibility lets you change a model later, but the guide's first advice is to write the queries first."},{"id":"b","text":"Delete the release date, because range questions are better answered elsewhere.","whyNot":"The guide never suggests dropping data that a query needs; it shapes the model around the queries."},{"id":"c","text":"Convert the date to a string, since strings are faster to compare.","whyNot":"The guide does not say string dates query faster; its advice is about where the date lives in the model."},{"id":"d","text":"Store the date as its own node or relationship, not as a property on the node.","why":"The guide says that when queries need results within a date range, the date should be a separate node or relationship."}],"answer":"d","explanation":"The guide advises writing queries first, and storing a value that range queries depend on as a node or relationship rather than as a property.","concept":"The guide advises writing queries first, and storing a value that range queries depend on as a node or relationship rather than as a property.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Decide the queries first, then place the values they filter on where they can be reached cheaply."]}]