# Structural differences and limitations with MongoDB

{% hint style="info" %}
**Required license:** Professional or Enterprise
{% endhint %}

The data structure for MongoDB is different from that of relational data connectors.

Instead of schemas, tables, and columns, a MongoDB database consists of collections and fields. A field might be an object that is made up of other fields. In other words, a collection can have a tree structure that is similar to a JSON document.

For workspaces that use MongoDB, the Tonic Structural application has the following differences.

## Terminology changes <a href="#mongodb-tonic-differences-terminology" id="mongodb-tonic-differences-terminology"></a>

On the following Structural views, the term "collection" replaces the term "table".

* [Privacy Hub](https://docs.tonic.ai/app/generation/privacy-hub)
* [Schema Changes](https://docs.tonic.ai/app/generation/schema-changes)
* [Subsetting](https://docs.tonic.ai/app/generation/subsetting)

References to columns are also replaced:

* On **Privacy Hub**, the protection status panels refer to "fields" instead of "columns".
* On the **Schema Changes** view, the change lists refer to "paths" instead of "columns".

## No schema caching

MongoDB does not allow you to cache the database schema.

## Privacy Hub - Latest Collection Scan <a href="#mongodb-tonic-differences-privacy-hub-collection-scan" id="mongodb-tonic-differences-privacy-hub-collection-scan"></a>

For MongoDB workspaces, Structural must scan each collection to determine the fields and data types within that collection. Until a scan is performed, you cannot configure the collection modes and generators.

For MongoDB workspaces, **Privacy Hub** includes an additional **Latest Collection Scan** section that shows the most recent time that a scan was performed on each scanned collection.

For more information, go to [mongodb-collection-scans](https://docs.tonic.ai/app/generation/working-with-document-based-data/mongodb-collection-scans "mention").

## No Privacy Report downloads

For MongoDB workspaces, there are no options to download a Privacy Report CSV or PDF.

## No workspace inheritance <a href="#mongodb-tonic-differences-workspace-inheritance" id="mongodb-tonic-differences-workspace-inheritance"></a>

MongoDB workspaces do not support workspace inheritance.

## Collection View replaces Database View and Table View <a href="#mongodb-tonic-differences-collection-view" id="mongodb-tonic-differences-collection-view"></a>

For MongoDB workspaces, there is no **Database View** or **Table View**. Instead, MongoDB workspaces have a **Collection View**.

This view allows you to perform the same functions as **Table View**, but the display is more like **Database View**. For more information, go to [mongodb-collection-view](https://docs.tonic.ai/app/generation/working-with-document-based-data/mongodb-collection-view "mention").

## Collection mode (table mode) limitations <a href="#mongodb-tonic-differences-collection-modes" id="mongodb-tonic-differences-collection-modes"></a>

Collection mode is the term for [table mode](https://docs.tonic.ai/app/generation/table-modes) in MongoDB workspaces.

MongoDB only supports De-Identify, Truncate, and Preserve Destination modes.

## Generator limitations <a href="#mongodb-tonic-differences-generators" id="mongodb-tonic-differences-generators"></a>

MongoDB workspaces cannot use the following generators:

* Algebraic
* Alphanumeric Key
* Array Character Scramble
* Array JSON Mask
* Array Regex Mask
* Cross-Table Sum
* CSV Mask
* Event Timestamps
* HTML Mask
* JSON Mask
* SIN
* Text Composition
* URL

## Self-consistency only

MongoDB workspaces only support self-consistency.  You cannot configure a MongoDB field to be consistent with another field.

## No upsert <a href="#mongodb-limitations-no-upsert" id="mongodb-limitations-no-upsert"></a>

MongoDB workspaces do not support upsert.

## No output to a container repository <a href="#mongodb-tonic-limitations-containerization" id="mongodb-tonic-limitations-containerization"></a>

For MongoDB workspaces, you cannot write the destination data to a container repository.

## No post-job scripts <a href="#mongodb-tonic-differences-post-job-scripts" id="mongodb-tonic-differences-post-job-scripts"></a>

For MongoDB workspaces, there is no option to run post-job scripts after a job.

You can create [webhooks](https://docs.tonic.ai/app/workflows/webhooks) that are triggered by data generation jobs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/app/setting-up-your-database/mongodb/mongodb-tonic-differences.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
