"Document" definition

What is the difference between a “record” as defined in a standard (relational) database, and a MongoDB document? MongoDB refers to “objects” and “documents” as pretty much the same thing, but how does this usage differ from the term “record”?

Thank you.

Hey @Sarah_39095

If I understand the question right, the answer is they both represent a single item stored in the database.

From wiki:

A record is a set of data representing an single item

In comparison to an ‘object’ / ‘document’ in mongodb;

MongoDB documents are composed of field-and-value pairs

There are some difference though like talked about in this article;

  • MongoDB is schema-less. It is a document database in which one collection holds different documents. But in RDBMS, you need to first design your tables, data structure, relations, and only then can you start coding.
  • There may be a difference between the number of fields, content, and size of the document from one to other. But in RDBMS, every record must adhere to a particular predefined schema.
1 Like