MongoDB views
- Last Updated: July 30, 2025
- 1 minute read
- DataDirect Connectors
- ODBC
- MongoDB 8.0
- Documentation
MongoDB databases allow you to create read-only views from existing collections or other views. MongoDB views are queryable objects that are typically used to join collections, add computed fields to collections, or exclude sensitive information. Similar to collection discovery, the driver detects MongoDB views when sampling and mapping data from the server. Data from the view is mapped to relational views using the same method as the rest of your collections (normalized, flattened, or mixed).
Be aware of the following behaviors when using MongoDB views with the driver:
- Relational tables mapped from MongoDB views are read-only
- Nested objects in a view are normalized to child tables in accordance to the driver's relational mapping behavior (normalized, flattened, or mixed). This is the same behavior used when mapping collections to the relational view.