MongoDB: what are the differences between documents, records, and attributes?

穿精又带淫゛_ 提交于 2019-12-05 03:36:18

问题


The documentation on documents seems to favor the term "document", and also refers to "database records". Elsewhere, competent MongoDB developers have apparently interchangeably used "attributes" and "records".

What is the correct/official terminology to use in various instances? Is it documented somewhere on mongodb.org?


回答1:


The confusion is merely because many MongoDB users are not just MongoDB users but also use 100 other techs including SQL.

I personally have mixed up my language as well, it's not uncommon however document and database records are the same thing and properties, attributes and columns are the same thing as well.

It should be noted that meteor calls them attributes because they are attributes within an object in JS (most likely that's why).




回答2:


In MongoDB terminology document is a more generic term than a database record.

For example, the documentation page you linked says explicitly that database records, query selectors, update definitions, and index specifications are all documents.



来源:https://stackoverflow.com/questions/21851044/mongodb-what-are-the-differences-between-documents-records-and-attributes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!