In a relational database, a blog post with its tags and comments is spread over several tables: posts , tags , post_tags , comments . To show one page, you join them back together. Your application code, meanwhile, works with a single object: a post that has a list of tags and a list of comments. A document database removes that gap. It stores the object roughly as your code sees it, as one document.
MongoDB is the best-known document database. This article explains what a document is, how MongoDB stores and finds documents, and the main design decision you make with it: embed or reference.
What a document is
A document is a set of field and value pairs, like a JSON object. Values can be strings, numbers, dates, booleans, nested objects and arrays.…