title: Building an api with several arrays which can be updated
body: <p>I'm new to noSQL and i'm trying to figure out how to create the best possible model structure. What i need to do is every hour to retrieve leagues and matches from an api and add it to my database. Every hour the score might change and new matches might be added to each league and therefor this should be possible in the model. i've read the documentation and created following, however i'm not sure it is possible to update each and add new matches to leagues. What is the ideal modelling for such?</p>
  
  <p><strong>Tournament model</strong></p>
  
  <pre><code>var mongoose     = require('mongoose');
  var Schema       = mongoose.Schema;
  var League     = require('./league');
  
  var TournamentSchema = new Schema({
      slug: String,
      tournaments: [League]
  });
  
  module.exports = mongoose.model('Tournament', TournamentSchema);
  </code></pre>
  
  <p><strong>League</strong></p>
  
  <pre><code>var mongoose     = require('mongoose');
  var Schema       = mongoose.Schema;
  var Match    = require('./match');
  
  var leagueSchema   = new Schema({
      leaguetId: Number,
      name: String,
      matches: [Match]
  
  });
  
  module.exports = mongoose.model('League', leagueSchema);
  </code></pre>
  
  <p><strong>Match</strong></p>
  
  <pre><code>var mongoose     = require('mongoose');
  var Schema       = mongoose.Schema;
  
  var matchSchema   = new Schema({
      homeTeam: String,
      awayTeam: String,
      homeScore: Number,
      awayScore: Number,
      start: Date
  
  
  });
  
  module.exports = mongoose.model('Match', matchSchema);
  </code></pre>
  
  <p><strong>Post request so far</strong></p>
  
  <pre><code>router.post('/tournaments', function(req, res, next) {
  
        var tournament = new Tournament();      // create a new instance of the Bear model
         tournament.name = req.body.slug;  // set the bears name (comes from the request)
  
         // save the bear and check for errors
         tournament.save(function(err) {
             if (err)
                 res.send(err);
  
             res.json({ message: 'Tournament created!' });
         });
  
  });
  </code></pre>