我不擅长 MongoDB 设计,我需要设计数据库的帮助。存储具有答案选择和候选人答案的问题的最佳结构是什么?
-如果考生在第一次考试中失败,每位考生将得到一组 12 个问题,他们可以再参加 2 场考试。所以在每次考试中,考生每次都应该得到不同的问题。
- 由于每个问题集是 12,因此每个测试的每个候选人的答案都必须记录在 12 分中。
我尝试将数据插入 mongodb。它已成功插入,但我面临错误的文档插入 mongodb 的问题。如何使用 mongodb 中的更新查询来更新文档中的键和值。
Json数据格式
{
"brand": "LG",
"colour": "Black",
"item height": "14 Millimeters",
"item width": "14.1 Centimeters",
"item weight": "200 g",
"product dimensions": "13.5 x 14.1 x 1.4 cm",
"item model number": "GP65NB60",
"included components": "Power2Go, PowerBackup, YouCam, LabelPrint and Norton internet security (60 days trial)"
}
Run Code Online (Sandbox Code Playgroud)
如何使用 mongodb 中的更新查询将关键前品牌更新为品牌。