N
N
nezzard2018-07-26 14:03:13
firebase
nezzard, 2018-07-26 14:03:13

How to organize the correct structure of the firestore base?

Good afternoon, I started getting acquainted with firebase, but due to the small amount of documentation in Russian, many questions appeared, in particular, with the organization of the firestore structure.
The first question is which of these options is correct?
- movies
-- id
-- data
- actors
-- id
-- data
- roles
-- actorId
-- movieId
or variant
- movies
-- id
-- data
-- actors
--- Leonardo D.
---- data
-- - Emma W.
---- data
I read that firestore indexes almost all data and let's say if I want to select all actors from movies, then there should be no problems with this.
Actually the second question, is it really possible to make a selection of actors from a collection of films and it will not be very costly in terms of resources?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question