Originally Posted on Medium

Take 5 minutes. Ask yourself the four questions listed below. Answer ‘yes’ to at least one of them, and you might want to consider looking into graph databases like Neo4j. While this checklist is by no means exhaustive, it covers some of the lowest common denominators of real Neo4j projects.

Question 1: Will I be evolving this project and data model over time?

Let me guess. You know about the schema migrations that await. Perhaps you’ve experienced the constant updating of unrelated queries and code as your schema changes. The one-off columns that creep into your tables. The heavy data lifting in your application code. You’ve been down this road before. You know exactly where it ends. And I know that’s not where you want to be.

Take the red pill.

Question 2: Am I doing more than one JOIN?

You have no conceptual problem with JOINs. They are, in fact, very logical. But when you ask your database to do several of them, it just doesn’t seem to run as smoothly as it should. When you return to that beautiful query months later, you struggle to remember why the sixth JOIN was a FULL OUTER one. Soon you start dreading making changes to your queries, and you only do it when you have to. You stop pushing the boundaries of your data. You are eyeing the blue pill.

Take the red pill.

Question 3: Will I potentially want to ask other things of this data later?

The schema makes you feel safe. You know what’s in your database. But as the saying goes, you don’t know what you don’t know. Rue the day when you get asked to figure out how these things over here relate to those things over there. Don’t think it will happen? It will. And when it does, you will build a glorious denormalized, pre-computed view of that data. It may be a bit stale, but hey, it works. Before you know it though, you’ll be herding static views like they were cats, i.e. not at all. You know what to do, right?

Take the red pill.

Question 4: Do I feel inclined to draw the graph on a whiteboard?

This is actually my favorite question. The human brain’s urge to look for patterns in information is exceptionally strong. Put a human in front of a whiteboard with a pen, give them a problem to solve, and they will draw something — I guarantee it. What if your application and domain design worked exactly like a whiteboard? Wouldn’t that be something?

Take the red pill.

Want to learn more about graph databases? Click below to get your free copy of O’Reilly’s Graph Databases ebook and discover how to use graph technologies for your application today. Download My Ebook



About the Author

David Montag , Field Engineering Nordics

David Montag Image

David Montag is the lead for providing support and consulting to Enterprise Neo4j users within Silicon Valley. Working closely with Cisco, Adobe and Viadeo, he has first-hand experience working with large scale companies putting Neo4j into production. David has been passionate about computers ever since he was given his first Amiga 500 (with the RAM upgrade) at age seven. Now, 19 years later, he works as a software engineer in the valley for Neo Technology, the commercial backer of Neo4j, the most widely deployed graph database in the world. He loves his supporting family, his fantastic job and programming.

1 Comment

D ROY says:

Why two condition are not working? Like:

MATCH (kenu:Person{name:”Kenu Reeves”}) -[:ACTED_IN]->(movie)(movie) WHERE actor < kenu RETURN DISTINCT actor.name

I need to find those actor who worked with Keanu But not with hugo and who are older than kenu?
Plz help me. i am very new to Neo4j

Leave a Reply

Your email address will not be published. Required fields are marked *


Upcoming Event


Have a Graph Question?

Stack Overflow
Community Forums
Contact Us

Share your Graph Story?

Email us: content@neo4j.com