Can two nodes have the same predicate, the same facts key, but different facts value?

I want to know if two nodes in the Dgraph library can have two identical predicates, but they can be distinguished according to the same facts key, but different facts values?

Two different nodes (i.e., subjects) can have the same predicate/object with different facet values (I believe you’re asking about facets). They’re distinct.


_:first  <name> "Daniel" (nickname=Dan) .
_:second <name> "Daniel" (nickname=Danny) .

trip_at_the_same_time: uid .
<0x1> < name > “alice”@en .
<0x7531> < name > “Bob”@en .

<0x1> <trip_at_the_same_time> <0x7531> (time=“2019”) .
<0x1> <trip_at_the_same_time> <0x7531> (time=“2018”) .

can dgraph have two differnt edges like above?

I have already tried, dgraph can not support your demand.The facet value will be overwrite by the last mutation.

You need to create two different data points for the two trips.

Now that I have the same problem, I think it’s a very useful feature that edges can be set to be multi-valued

Not sure what it can accomplish with it, well two objects cannot occupy the same place (Newton would say). And an object cannot be two things at the same time (Unless we are talking about quantum database? Hehehe).

An entity can have only unique edges/predicates. If you want to have multiple, rename it to “pred1, pred2, pred2.1” and etc. An edge can point to multiple entities, you can have lists, you can create intermediate queues between entities, and so on.

There are several ways to handle this without having to do complicated things in DB.
This could be considered with a real world case and convincing use case.