Legendary
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Thanks so much! I really appreciate your time and patience 🙂
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Right okay I think I get you now. I think it's probably important to note is that there is information in that external vertex that is useful to the use case other than the
batchId
and reusableId
-- content
was just one example, so I think it makes sense for it to be it's own vertex. Based on what you're saying, I think it probably makes sense just to stick with the relates_to_batch
and relates_to_reusable
example, we spoke about earlier.34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Sorry if we are going in circles!
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Those examples are practically the same. I'm also not tied to either approach, I think I'm just trying to understand what is the most "correct" way of doing things. I guess this kind of goes back to my original question about storing vertex references in another vertex? I think the term
batch
here makes this a bit confusing cos we are already using batch
for batch-a
. Is this meant to symbolize the same object? I think it's supposed to be connected
if we wanted to tie this closer to the example. Curious to know what the edge would connect to? Is it the batch
that contains batch-a
?34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
The issue with the
reusableIds
to batch-a
is we are only really concerned with the ids that are connected both relates_to_batch
and related_to_reusable
via that connected
vertex. For example, we might have a connected
vertex that relates_to_batch
via batch-a
but might be related_to_reusable
via r2
-- These ids can't be contained within the same batch, since it's specific to the combination of batch and reusable. so I'm not too sure how it would work by adding the list to batch-a
. I hope this clarifies the questions you had about denormalization. Not sure if you wanna discuss this further, but happy to move on for now 🙂34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Im also interested to know if the latter is considered an anti-pattern or code smell
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Also not sure about the performance implications of each of these
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Also something like:
Is a lot more straight forward than the above, imo
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
We've discussed a lot here, a lot of it has probably been lost in translation haha
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Especially since the links are so loosely related, it seems like there could be benefit to removing the edges entirely
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
I think what seemed "weird" to me:
Having to traverse in and out to get the data I was after. I was wondering the implication of just storing that data as property values
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
hahaha
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
No it’s a direct connection between batch and reusable. There are additional edges coming off reusable but I’m not sure how relevant that is
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
On average there are 5 reusable per batch
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Yes
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Yep looks good!
34 replies
ATApache TinkerPop
•Created by Legendary on 4/1/2023 in #questions
Isolated vertices vs connected vertices with no join benefit
Yeah sorry! I didn’t actually try out the scripts before posting but was just trying to demonstrate the use case! The data structure is accurate and I think this is probably part of the problem; the “relates_to” connections are so loosely related which is kind of why I want to remove the edges entirely. The link between “batch” and “reusable” is concrete and has to stay. The importance behind the “connected” vertex is the content. For example, I might have another “connected” vertex that related to a “batch-c” but still “r2” but the “content” property would be entirely different. I need a way to get that “content” for the combination of “batch” and “reusable”. Yes, whatever needs to change is still possible to change. E.g if property keys make more sense, it’s doable. If reassigning ids makes more sense that’s also doable 👍🏼
34 replies