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