A collection groups related documents in a document-oriented NoSQL database. Its documents use flexible key/value schemas rather than fixed rows and columns, so records can include related information directly. section 4.1.1
For the board-game API, a boardgames collection can store each game with its comments, while a users collection can hold user records and roles. Embedding parent-child data usually reduces the number of collections and avoids relying on references for every relationship. section 4.1.1
A collection differs from a table in several practical ways:
- Uses flexible documents instead of a fixed schema of rows and columns. section 4.1.1
- Stores related information inside a parent document when appropriate, producing a loosely structured and often denormalized design. section 4.1.1
- Retains key-based relationships for entities, such as users, that multiple documents need to reference. section 4.1.1
Use the document-oriented schema diagram to compare collections, embedded data, and relationships across the board-game API. section 4.1.1















