How everyone in this video I will show you one.
More features will be the boss reactions okay and social media application will be have a reaction into
specific posts.
Right?
Let's see how we can design the collection.
Well.
For example in later we have some boss like alter contents okay.
And some properties over here.
And how we can resize the document for the boss reaction, for example.
Like that I will have a reaction with the array inside the array.
Right here we will have a user id okay for first of all, I like that.
And.
You know the high possible line over here.
Oh.
Wow.
Okay.
Or.
Haha.
Okay, something like that.
Okay.
We can we use the regression line.
That's one.
But you can turn this good or not.
Well for example it later with this post over here we have a 1 million reactions.
It means inside the reaction over here we will duplicate, uh, we will have so many document in the
reactions.
Right.
It may be Eliza.
We will grow the reaction.
Alright.
Right here is very big.
And that's clearly not good at all.
Right.
So for that reason with the reaction.
We will not do that.
We split up.
We will separate it into another document.
First of all I reaction over here okay.
With the reaction over here we will have a boss ID right.
Possible like one okay.
We will refer to this part and we will have a user.
Okay.
First of all I use a tool okay.
Use a tool reaction was one with a high grade like, okay, something like that.
We will use.
We will use in the narrative.
Let us at least very good.
Right.
And right here we also have one more problem which is in lighter.
If I want to know the boss right here.
How?
Uh, so some reaction counts.
For example, how many, like, belong to the boss or how many wow into the boss?
Or how many?
Haha into this boss right here.
Well, how do I know that?
Well, we need to do some aggregation.
And aggregation right here is also it has some limitation.
It means the aggregation.
This is for it has a little bit of performance issue.
It's not good for performance.
So for that reason inside the box right here we can create the sum calculation field directly over here.
Right.
We actually have something like that we will create the circular loss will be for example like.
All right.
We will create a loss whenever a user reaction we need to create the reaction into the reaction document.
Okay.
We will add a reaction document.
And we also update the filter here into the box.
Okay.
It means insert the box right here.
We can provide one more thing one more field for reaction count.
And in later when we get our box we just need to get this.
And you will see we will have so many thing reaction over here.
Okay.
We don't need to do some complex queries or something like that.
Okay.
That's the strategy right now and I hope you understand this video.
In the next video, let's step by step and build the reaction and provide one more thing.
So I will see you in the next one.