Date
1 - 4 of 4
Property keys unique per label
Laura Morales <lauretas@...>
The documentation says "Property key names must be unique in the graph". Does it mean that it's not possible to have property keys that are unique *per label*? In other words, can I have two distinct properties with the same name but different data-value types, as long as they are applied to vertexes with different labels?
Laura Morales <lauretas@...>
Janus describes itself like this
a scalable graph database optimized for storing and querying graphs containing hundreds of billions of vertices and edges distributed across a multi-machine cluster
but my feeling when using it is that this definition means "a simple schema with billions of vertices/edges" and not "a graph with a large schema". This limitation with properties is an example. What I mean is a graph big enough that vertices on one corner of the graph represent something entirely different (semantically) from vertices on the far end of the same graph. So for example, I could use property "age" with a meaning, but use it with a completely different meaning somewhere else on the graph. Because properties names are unique, I must namespace them, for example "contextA.age" and "contextB.Age". But if nodes could be grouped by "context" for example, or maybe properties could be bound to labels, I would not need to namespace them and their datatype would only depend by their context.
I don't know if this makes sense to others, but to me it does.
Sent: Tuesday, July 27, 2021 at 2:00 PM
From: hadoopmarc@...
To: janusgraph-users@...
Subject: Re: [janusgraph-users] Property keys unique per label
Hi Laura,
Indeed, unique property key names are a limitation. But to be honest: if two properties have a different data-value type I would say these are different properties, so why give them the same name?
Best wishes, Marc
a scalable graph database optimized for storing and querying graphs containing hundreds of billions of vertices and edges distributed across a multi-machine cluster
but my feeling when using it is that this definition means "a simple schema with billions of vertices/edges" and not "a graph with a large schema". This limitation with properties is an example. What I mean is a graph big enough that vertices on one corner of the graph represent something entirely different (semantically) from vertices on the far end of the same graph. So for example, I could use property "age" with a meaning, but use it with a completely different meaning somewhere else on the graph. Because properties names are unique, I must namespace them, for example "contextA.age" and "contextB.Age". But if nodes could be grouped by "context" for example, or maybe properties could be bound to labels, I would not need to namespace them and their datatype would only depend by their context.
I don't know if this makes sense to others, but to me it does.
Sent: Tuesday, July 27, 2021 at 2:00 PM
From: hadoopmarc@...
To: janusgraph-users@...
Subject: Re: [janusgraph-users] Property keys unique per label
Hi Laura,
Indeed, unique property key names are a limitation. But to be honest: if two properties have a different data-value type I would say these are different properties, so why give them the same name?
Best wishes, Marc
hadoopmarc@...
Hi Laura,
Thanks for explaining in more detail. Another example is a "color" property. Different data sources could use different types of color objects. As long as you do not want to query for paints and socks with the same color, there is no real need to harmonize the color data-value types.
Also note that an index on a property can already be constrained to a single vertex or edge label. So, if anyone would contribute your idea as a JanusGraph feature, I would guess there would be no objection.
Best wishes, Marc
Thanks for explaining in more detail. Another example is a "color" property. Different data sources could use different types of color objects. As long as you do not want to query for paints and socks with the same color, there is no real need to harmonize the color data-value types.
Also note that an index on a property can already be constrained to a single vertex or edge label. So, if anyone would contribute your idea as a JanusGraph feature, I would guess there would be no objection.
Best wishes, Marc