Reputation: 152018
I've seen the terms "attribute" and "field" used interchangeably, and I'd like to know what the proper usage is. So far, it seems that "fields" are what's stored in the database objects, and "attributes" are key-value pairs used in client code, such as in find()
calls.
Upvotes: 3
Views: 2188
Reputation: 311865
MongoDB documents contain key-value pairs, where each pair can be interchangeably referred to as a "field", "property", or (less frequently, but not inaccurately) "attribute".
Using "field" or "property" is probably best.
Upvotes: 3