Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

April 12, 2013

Null Values in Neo4j

Filed under: Graphs,Neo4j — Patrick Durusau @ 1:04 pm

While researching the new labels feature in Neo4j 2.0.0-M01, I ran across the following statement in the documentation:

Note

null is not a valid property value. Nulls can instead be modeled by the absence of a key.

(Properties 3.3)

The question is asked in the comments:

Bryan Watson • a year ago −
What is implied by the absence of a key (“null”)?
(1) the key is relevant but the value is unknown? (spouse of a customer)

and answered:

Andrés Taylor Bryan Watson • a year ago −
In Neo4j, the absence of a key can mean all three options. Is that problematic in a particular concrete case, or are you wondering in the general case?

and,

Andrés Taylor Bryan Watson • a year ago −
You are correct. Neo4j is an unstructured database, which moves some of the responsibilities to the application. This is one of the things that the application has to take care of.

Problematic for topic maps because a role in an association may be known but the player of that role unknown.

Moreover, what happens if there are multiple “nulls?”

An application could have a “schema” for a node type that makes it possible to spot missing keys, but that seems like a long way to go for a “null.”

I don’t find “unstructured database” to be a persuasive argument for moving responsibilities to an application.

Databases, unstructured or otherwise, should be able to deal robustly with the various cases of “null.”

1 Comment

  1. […] I was pondering the treatment of nulls in Neo4j (Null Values in Neo4j), it occurred to me that we have something quite similar in the […]

    Pingback by Unknown Association Roles (TMDM specific) « Another Word For It — April 13, 2013 @ 4:22 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress