and how to stop data duplication?
I can now add this (in likes edge):
{"_from":"users/2","_to":"posts/335115"}
{"_from":"users/2","_to":"posts/335115"}
but it should not be so.
понедельник, 24 февраля 2020 г., 15:49:49 UTC+3 пользователь Alexander V.
Tihonov написал:
>
> Situation:
> There is a user, there is a post that the user can create, and there are
> comments that the post may have. it turns out 3 collections: users, posts,
> commentsQuestion:
> How to organize likes?Assumption (2 options that I see):
> 1. Perhaps you need to create 1 collection of edge (likes) and associate
> with documents:
> Like user:
> {_from: 'user/123', _to: 'user/456'}
> Like post:
> {_from: 'user/123', _to: 'post/789'}
> like comment:
> {_from: 'user/123', _to: 'comment/654'}2. Create a collection of edges
> for each entity (userlikes, postlikes, commentlikes)Tell me how to do it
> correctly in order to speed up the calculation as much as possible:
> a) how many likes and who put them on the post
> b) to whom / what the user likeJust starting to understand arangodb so
> don’t scold for stupid questions. I read Doc, but there are so many options
> and which one will be more optimal is hard to understand.
>
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/arangodb/65b3e59e-75da-4ce7-b9ad-d3dca3a7d92f%40googlegroups.com.