Optimization with MongoDB

1

I'm starting with MongoDB and I'm having a question about optimization.

COLLECTION BOLAO:

[
campeonato : 'Brasil - Série A',
confrontos : [
{
  id : 10,
  casa : "Sport",
  visitante : "Chapecoense",
  horario : "2017-07-20 11:00:00"
}
]
]

COLLECTION BETTER: MODE 1 This would use less data, but thinking a little relational

{
  nome : "wedson",
  apostas : [
   {
     idjogo : 10,
     opcao : 1,
     valores : 1
   }
  ]
}

COLLECTION MODEL 2 SETTING This would use the concept of embedded documents, but the data load would be larger

{
  nome : "wedson",
  apostas : [
   {
      id : 10,
     casa : "Sport",
     visitante : "Chapecoense",
     horario : "2017-07-20 11:00:00"
     idjogo : 10,
     opcao : 1,
     valores : 1
   }
  ]
}

The question is to use mode 1 where or mode 2, did not want to start a project without knowing these small details already thank you. :)

    
asked by anonymous 18.07.2017 / 00:49

0 answers