Realizando consultas dobles a la base de datos de firebase [ESP-ENG]

Si bien muchos desarrolladores hemos utilizado este tipo de base de datos para proyectos pequeños, hay momentos en los cuales debemos crear relaciones entre colecciones dentro de la base de datos y firebase permite hacerlo de manera visual e intuitiva.
Esto es muy ventajoso para cualquier desarrollador porque crea una relación entre dos colecciones y no tenemos que estar generando consultas separadas a diferentes colecciones.

Although many developers have used this type of database for small projects, there are times when we must create relationships between collections within the database and Firebase allows us to do so in a visual and intuitive way. This is very advantageous for any developer because it creates a relationship between two collections and we do not have to be generating separate queries to different collections.

En mi código muestro cómo hacer una consulta a una colección que contiene otra colección adentro.

In my code I show how to make a query to a collection that contains another collection inside.
No es complejo pero tiene un pequeño inconveniente que requiere el identificador del documento el cual contiene la colección dentro de la colección padre. Una vez que se obtiene este identificador el resto es sencillo pero del lado del cliente puede llegar a ser molesto porque es una consulta a una base de datos que hace otra consulta interna lo cual el tiempo de respuesta es mucho mayor.
It is not complex but it has a small drawback that requires the identifier of the document which contains the collection within the parent collection. Once this identifier is obtained, the rest is simple but on the client side it can be annoying because it is a query to a database that makes another internal query which has a much longer response time.


0
0
0.000
7 comments
avatar

I am yet to try firebase. Is it worth looking into?
!BBH !DUO !hiqvote

0
0
0.000
avatar

Depends of the size of your app, for something tiny like handle a few users and their data is good but sometimes the request is so slow than You must wait 7 secs to get a simple response

0
0
0.000
avatar

Suddenly it sounds like I should just skip it 😅
I assume it's not very good with relation databases.

0
0
0.000
avatar

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support. 
 

0
0
0.000