0

I've been following this tutorial to build a rating system.

Which suggests the following collections:

Movies:

  • uid
  • title

Users

  • uid
  • name

Stars

  • movieId
  • userId
  • value

Now, suppose I wanted to display only pending movies to be rated by users.

How could this query be written?

1 Answer 1

1

If you think you'll actually have a small number of pending and not an imdb sized list you could

  1. Get all movies
  2. Get all movies rated by this user
  3. Use the two collections to firm a list of movies they need to review

Or 1. Add a sub collection to user called unrated movies 1. every time a niche is added to the db add it to every user's collection 1. When a user reviews a movie delete from collection

Or have a value in the stars db of - 1 to represent unrated, add that for all users and all movies, then query by user ID and value is - 1

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.