[{"id":"neo4jadvanced-001","courseId":"neo4j-advanced","domain":"graph-modeling","topic":"Micro and macro relationship design","prompt":"A graph links people and movies with one generic CONNECTED_TO relationship type. Every query traverses all of those links, even when it wants only acting credits. What should the team do?","hint":"Think about what a relationship's name tells the database before it walks the graph.","explain":"A relationship's name tells the database what kind of connection it is. When many different connections share one generic name, every query must pass through all of them.","source":"https://neo4j.com/docs/getting-started/data-modeling/guide-data-modeling/","interaction":{"type":"single"},"options":[{"id":"a","text":"Use specific types such as ACTED_IN and DIRECTED, so traversals follow only the relevant links","why":"Specific relationship types let Neo4j traverse only the connections a query needs, instead of every link."},{"id":"b","text":"Keep CONNECTED_TO and add a role property, since one type is easier to maintain","whyNot":"A property can describe a link, but the generic type still forces every query to traverse all of them."},{"id":"c","text":"Store each link as a property on the person node, since types only matter for indexes","whyNot":"Types are not only for indexes; they decide which connections a traversal follows."},{"id":"d","text":"Make every link undirected, so queries can match it from either end","whyNot":"Every relationship must have a direction, so undirected links do not narrow the traversal."}],"answer":"a","explanation":"Specific relationship types let Neo4j traverse only the connections a query needs, so a generic type widens every traversal.","concept":"Specific relationship types let Neo4j traverse only the connections a query needs, so a generic type widens every traversal.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Name relationship types for the question they answer; generic types make every traversal wider."]},{"id":"neo4jadvanced-002","courseId":"neo4j-advanced","domain":"graph-modeling","topic":"Shared property values as entities","prompt":"A ProductionCompany node stores its state as a string property, and many companies share the value 'CA'. Which TWO changes follow the modeling advice for shared values?","hint":"The fix is to stop repeating a value on every entity and to shorten what a query must read.","explain":"A value repeated across many entities duplicates data, and filtering on it can make queries read far more than they need. Modeling aims to shrink what each query touches.","source":"https://neo4j.com/docs/getting-started/data-modeling/tutorial-refactoring/","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"Turn the shared state value into its own State node, and connect each company to it with a relationship","why":"The page suggests a State node linked to the companies by a LOCATED_AT relationship, which removes the repeated value."},{"id":"b","text":"Keep state as a property, but add an index on it so lookups do not scan every company","why":"The page offers an index as an alternative when queries over-fetch shared values."},{"id":"c","text":"Copy the full company address onto every movie node, so each query reads a single node","whyNot":"That adds more duplicate data, and the page says the goal is to shrink what a query touches."},{"id":"d","text":"Keep the repeated state strings, since storage is cheap and duplicates never slow queries","whyNot":"The page treats duplicate data as a problem, and over-fetching makes queries slower as the graph grows."},{"id":"e","text":"Delete the state property from every company, since filtering on it is always slower than a scan","whyNot":"Removing the value drops a filter the use case needs; the page moves it into a shorter path instead."},{"id":"f","text":"Add a new relationship between every pair of companies that share a state","whyNot":"The page's fix is one shared entity, not a web of pairwise links between companies."}],"answer":"ab","explanation":"Repeated values across many nodes duplicate data and force over-fetching; a shared value can become its own node, or an index can narrow lookups.","concept":"Repeated values across many nodes duplicate data and force over-fetching; a shared value can become its own node, or an index can narrow lookups.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Repeated property values are candidates for their own node or relationship, not copies on every entity."]},{"id":"neo4jadvanced-003","courseId":"neo4j-advanced","domain":"graph-modeling","topic":"Dense node threshold of 50 relationships","prompt":"The database setting db.relationship_grouping_threshold defaults to 50 and marks when a node counts as dense. Which store formats does this setting apply to?","hint":"Look closely at the format list in the setting's description, and at the default format.","explain":"A node that gathers many relationships is treated differently from one with few, and a configured count marks the boundary. Not every store format applies that count-based rule in the same way.","source":"https://neo4j.com/docs/operations-manual/current/configuration/configuration-settings/","interaction":{"type":"single"},"options":[{"id":"a","text":"standard, aligned and high_limit formats only","why":"The setting applies only to these three formats; the block format is outside its scope."},{"id":"b","text":"All store formats, including block","whyNot":"The setting is limited to three formats, so block is not covered by it."},{"id":"c","text":"block format only, since it is the default","whyNot":"block is the default format, but this setting does not apply to it."},{"id":"d","text":"standard format only, since high_limit is deprecated","whyNot":"high_limit is deprecated, but the setting still applies to it, along with standard and aligned."}],"answer":"a","explanation":"db.relationship_grouping_threshold sets the dense-node count of 50, but it applies only to the standard, aligned and high_limit store formats.","concept":"db.relationship_grouping_threshold sets the dense-node count of 50, but it applies only to the standard, aligned and high_limit store formats.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["The dense threshold is format-specific; check the store format before tuning it."]},{"id":"neo4jadvanced-004","courseId":"neo4j-advanced","domain":"graph-modeling","topic":"Dense node threshold by store format","prompt":"A graph with more than 34 billion nodes can run on the standard db.format with no other configuration change.","hint":"Check which database formats the size limit names as required.","explain":"Neo4j stores data in one of several store formats, and they differ in how large a graph they can address. The format is set in configuration, so planned size matters when choosing one.","source":"https://neo4j.com/docs/operations-manual/current/configuration/configuration-settings/","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","whyNot":"The page does not let the standard format hold graphs that large; above 34 billion nodes it names high_limit or block."},{"id":"b","text":"False","why":"Standard is not an allowed choice at that size; the page requires either high_limit or block."}],"answer":"b","explanation":"Above 34 billion nodes, the page requires either high_limit or block; the standard format is not an allowed choice at that size.","concept":"Above 34 billion nodes, the page requires either high_limit or block; the standard format is not an allowed choice at that size.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Check store format size limits against your planned graph size before you load data."]},{"id":"neo4jadvanced-005","courseId":"neo4j-advanced","domain":"graph-modeling","topic":"Relationship writes and dense node locks","prompt":"In a standard-format database, a node has had 50 or more relationships, so it counts as dense. A second transaction now creates a relationship to that node. Which lock does the write take on it?","hint":"Compare the lock a sparse node takes with the rule for dense nodes in the table.","explain":"Each write claims a lock before changing data, and that lock decides which other transactions must wait. Some changes claim no lock, and the kind of entity affected can change which lock applies.","source":"https://neo4j.com/docs/operations-manual/current/performance/locks-deadlocks/","interaction":{"type":"single"},"options":[{"id":"a","text":"NODE DELETE prevention lock","why":"For a dense node, creating a relationship takes this lock rather than an exclusive NODE lock."},{"id":"b","text":"Exclusive NODE lock, the same as for a sparse node","whyNot":"A sparse node takes the NODE lock on creation; a dense node is handled differently."},{"id":"c","text":"No lock, because creating a relationship does not change the node's data","whyNot":"Creating a node takes no lock, but creating a relationship does take one."},{"id":"d","text":"RELATIONSHIP lock on the new relationship","whyNot":"The page lists the RELATIONSHIP lock for updating or deleting a relationship, not for creating one."}],"answer":"a","explanation":"Creating a relationship on a dense node takes a NODE DELETE prevention lock, not the exclusive NODE lock that sparse nodes use.","concept":"Creating a relationship on a dense node takes a NODE DELETE prevention lock, not the exclusive NODE lock that sparse nodes use.","rev":1,"updatedAt":"2026-10-27","kind":"scenario","takeaways":["Relationship writes to dense nodes avoid exclusive node locks in almost all cases."]}]