Organising Data FireBase attach to user node or create independent node?

StackOverflow https://stackoverflow.com//questions/22031828

  •  21-12-2019
  •  | 
  •  

سؤال

I am creating a social site using Firebase.

Each user possess: workout logs, journals, etc

Do I create branches for these entities where the user is registered on each post or to I attach to the user node?

هل كانت مفيدة؟

المحلول

It depends on how you want to read out the data later. There are several examples of building social sites on Firebase. http://firefeed.io, for example, organizes data as separate nodes for "sparks", "users". There's another example of how to organize your data in this blog post: https://www.firebase.com/blog/2013-04-12-denormalizing-is-normal.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top