I use to design 'table' like this
teacher
- id
- name
student
- id
- teacher_id
- name
Just assume 1 teacher can have many students, so I put teacher_id to be able to do join.
But in noSql why should I do multiple document? I can put everything under user and use nested object like
user = {[
id:1,
type:teacher
student:[{
id:321
}]
]}
Imagine my app need to retrieve a list of teacher and student in different tab, still with model I can get the data I need, I just do the filter/manipulation on the client side, correct?