实现 MongoDB 外键关联

2019-10-16| 发布者: admin| 查看: |

{"userId":"u01",
"courseid":"c01",
"timespent":6000,
score:99}
{"userId":"u02",
"courseid":"c01",
"timespent":6000,
score:99}
{"userId":"u03",
"courseid":"c01",
"timespent":6000,
score:99}
{"userId":"u04",
"courseid":"c01",
"timespent":6000,
score:99}
{"userId":"u05",
"courseid":"c01",
"timespent":6000,
score:99}
{"userId":"u01",
"courseid":"c02",
"timespent":6000,
score:99}
{"userId":"u02",
"courseid":"c02",
"timespent":6000,
score:99}
{"userId":"u03",
"courseid":"c03",
"timespent":6000,
score:99} {"_id":"c01"
"title":"Japanese159",
"description":"Japanese   base",
"category":"language"}
{"_id":"c02"
"title":"Chinese200",
"description":"Chinese   middle",
"category":"language"}
{"_id":"c03"
"title":"Political   science 280",
"description":"Political   middle",
"category":"politics"}
{"_id":"c04"
"title":"EE490",
"description":"electronic   engineering hign",
"category":"Electronic"}