This is my schema for my scoreboard application on mongodb. Now I cannot understand one thing that how would I make sure that this will not go higher than 16mb in size in mongodb the conditions are:
- you can only make 10 teams in championship
- one team can only have 12 players.
- points table will be very small as the no of teams
- matches and history array will have a lot of data
so this is the problem
championships{
"ChampionShip_Name":"IPL",
"overs":"10",
"config":[true,true,true],
"NoofTeams":12,
"teams":[{
"teamname":"chennai superkings",
"players":[{
"playername":"sachin tendulkar",
"skills":["batting","bowling"],
"position":"opener"
}]
},{
"teamname":"rajasthan royals",
"players":[{
"playername":"virendra sehwag",
"skills":["batting","bowling"],
"position":"opener"
}]
}],
"pointstable":[
],
"matchlist":[{
"team1":"chennai superkings",
"team2":"rajasthan royals",
"winner":"rajasthan royals",
"winningtag":"rajsthan royals won by 10"
"inining1":["123","45.5","5"],
"inining2":["124","12","4"]
}]
}
Scoreboard{
team1:"indian",
team2:"pakistan",
inings:[{
batting:{
},
bowling:{
}
},{
batting:{
},
bowling:{
}
}
]
}