Docs Menu
Docs Home
/ /

Modify Collections in Your Compass Entity-Relationship Diagram

You can modify your existing entity-relationship diagram in Compass to plan changes to your data model without affecting your actual data.

In the Data Modeling tab, you can:

  • Add or remove collections

  • Rename collections

Note

Any changes you make to your entity-relationship diagram won't affect your actual database.

You must have an existing entity-relationship diagram in Compass to modify the fields. To create a new diagram, see Generate an Entity-Relationship Diagram in Compass.

To add a new collection to your entity-relationship diagram:

1

In the left sidebar, click Data Modeling.

2

From the Data Modeling tab, open your diagram.

3

To add a new collection, click the icon in the upper-left corner of the diagram canvas. Clicking this icon opens a drop-down menu with two options:

  • Add a new collection

  • Select from database

Add collection icon in the Data Modeling tab

If you click Select from database, a dialog box opens that allows you to select existing collections from your database that aren't included in your diagram.

Note

If you imported your diagram or you aren't connected to the database used to generate your diagram, Compass prompts you to select a database connection.

To rename a collection in your entity-relationship diagram:

1

In the left sidebar, click Data Modeling.

2

From the Data Modeling tab, open your diagram.

3

Click one of your collections in the diagram. The collection side panel opens on the right side of the screen.

To delete a collection from your diagram:

1

In the left sidebar, click Data Modeling.

2

From the Data Modeling tab, open your diagram.

3

Click one of your collections in the diagram. The collection side panel opens on the right side of the screen.

4

In the side panel, click the icon.

  • Data Modeling in MongoDB

  • Data Modeling in MongoDB Compass

Back

Generate Diagram

On this page