DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Deciding On Graphs: Four Questions

Deciding On Graphs: Four Questions

Andreas Kollegger user avatar by
Andreas Kollegger
·
Feb. 18, 15 · Java Zone · Interview
Like (0)
Save
Tweet
5.37K Views

Join the DZone community and get the full member experience.

Join For Free

Originally Written by David Montag

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.

 

Database

Published at DZone with permission of Andreas Kollegger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 5 Steps to Strengthen API Security
  • Java: Why Core-to-Core Latency Matters
  • ETL, ELT, and Reverse ETL
  • Modernize Legacy Code in Production: Rebuild Your Airplane Midflight Without Crashing

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo