Skip to content

Instantly share code, notes, and snippets.

@minikin
Last active July 3, 2020 01:22
Show Gist options
  • Save minikin/cb452b35adf7b618306a046b315661ef to your computer and use it in GitHub Desktop.
Save minikin/cb452b35adf7b618306a046b315661ef to your computer and use it in GitHub Desktop.

Review

I don't know what was a reason to have these documents. I sincerely appreciate the time and effort of the person who did that! But, unfortunately, I don't think that these docs add any real value to a project.

If anyone from a team has a lack of Firebase knowledge. I encourage them to just watch 2 -3 hours of free videos: https://www.youtube.com/playlist?list=PLl-K7zZEsYLluG5MCVEzXAQ7ACZBCuZgZ.

We can schedule a chat to discuss Firebase if need it.

Untitled Diagram.drawio

  1. Recomendation
  • userID: There is no primary key in Firebase. Firebase is not a relational DB.
  1. Journals
  • userID: There is no primary key in Firebase. Firebase is not a relational DB.
  • journalType: Does this mean access level, like for Fridnds or Private?
  • reaction[array] : What data type reaction has? reaction is singular but contains a list of something.
  1. Journals -> comments
    • JournalId (private key): I'm not sure what does private key means in this context.
    • We miss updatedAt for editong comments.
  2. LiveStream
  • userId(private key): I'm not sure what does private key means in this context.
  • reactions[array]: What data type reaction has? Here reactions are plural :)
  1. LiveStream -> comments
  • Do we really need to have different types of comments Journals -> comments & LiveStream -> comments?
  1. User
  2. PlayList
  • Don't we need an id field for PlayList?
  1. VideoList
  • VideoList has AudioFiles? That's confusing.
  1. Messages
    • This model is totally confusing.

Modelling hvn through cloud Firestore

I can add comments by request if needed.

@Pushkar952
Copy link

I have discussed it with igor of what I mean by primary key. It’s a concept to forming relations between different entities.
However let me explain what primary key of user id is , It's the document id of the user under which all the user object would be scoped to, hence in relational term it becomes it's primary key.

Also the other document that i have shared , you will have better understanding of what i meant by all the relations. The ERD is not designed for cloud firestore or mongo db's, it plain relations between different entities.

Also in order to understand how relations are formed in nosql db, one can go through the article here.
https://geekyants.com/blog/modelling-twitter-in-cloud-firestore-29
Or can go through the video, where i have explained all the possible relations as well
https://www.youtube.com/watch?v=N41e0UFJl8A&t=1153s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment