我是 NoSql 数据库的新手,我很难弄清楚如何处理本地驱动器上可能超过 20MB 的非常大的 JSON 文档。这种结构肯定会随着时间的推移而增加,我担心查询的速度以及必须通过返回的 JSON 对象嵌套进行深入搜索才能得到一个字符串。例如,我的 JSON 嵌套很深。
{
"exams": {
"exam1": {
"year": {
"math": {
"questions": [
{
"question_text": "first question",
"options": [
"option1",
"option2",
"option3",
"option4",
"option5"
],
"answer": 1,
"explaination": "explain the answer"
},
{
"question_text": "second question",
"options": [
"option1",
"option2",
"option3",
"option4",
"option5"
],
"answer": 1,
"explaination": "explain the answer"
},
{
"question_text": "third question",
"options": [
"option1",
"option2",
"option3",
"option4",
"option5"
],
"answer": 1,
"explaination": "explain the answer"
}
]
},
"english": {same structure as above}
},
"1961": {}
},
"exam2": {},
"exam3": {},
"exam4": {}
}
}
在主应用程序中,根据考试类型、年份和主题创建和附加问题对象,使 JSON 文档随着时间的推移变得庞大。我该如何重新建模以避免将来查询缓慢?