i have USERS
TABLE that contains the following fields _id
name
number_of_posts
and i have POSTS
TABLE that contains the following fields _id
user_id
post_text
no the relationship between the users
and posts
is one- to -many
i.e one user have many post
the question is how to update the number_of_posts
in users
table such that it will hold the number of post in the posts
table
UPDATE
I have these tables filled with about hundreds of records there is no way to use the trigger to update the number_of_posts .