可以使用MongoDB建立关系数据库吗? [英] Can one make a relational database using MongoDB?

查看:59
本文介绍了可以使用MongoDB建立关系数据库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将使用MongoDB创建一个学生管理系统.我将为学生提供一张桌子,为出勤记录提供另一张桌子.如下图所示,我可以在出勤表中输入钥匙以到达学生表吗?怎么样?

I am going to make a student management system using MongoDB. I will have one table for students and another for attendance records. Can I have a key in the attendance table to reach the students table, as pictured below? How?

推荐答案

MongoDB背后的想法是消除(或至少最小化)关系数据.您是否考虑过将出勤数据直接嵌入每个学生记录中?实际上,这是MongoDB的首选设计模式,可以带来更好的性能和可伸缩性.

The idea behind MongoDB is to eliminate (or at least minimize) relational data. Have you considered just embedding the attendance data directly into each student record? This is actually the preferred design pattern for MongoDB and can result in much better performance and scalability.

如果您确实需要高度相关和规范化的数据,则可能需要重新考虑使用MongoDB.

If you truly need highly relational and normalized data, you might want to reconsider using MongoDB.

这篇关于可以使用MongoDB建立关系数据库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆