Docs Home / Compass / Data Modeling

Export Your Entity-Relationship Diagram from Compass从Compass导出实体关系图

You can share your refactored data model with other teams to receive feedback and align on final schema design decisions. 您可以与其他团队共享重构的数据模型,以接收反馈并就最终的模式设计决策进行协调。To share your refactored schema, you can export your entity-relationship diagram from Compass.要共享重构的模式,您可以从Compass导出实体关系图。

About this Task关于此任务

You can export your entity-relationship diagram as a:您可以将实体关系图导出为:

  • Diagram File.图表文件。
  • PNG image.

    PNG

    图像。
  • JSON file.JSON文件。

When you export your diagram as a Diagram File, Compass exports the diagram as a .mdm file. 当您将图表导出为“图表文件”时,Compass会将该图表导出为.mdm文件。This file format allows you to import the diagram into Compass, which can be helpful when sharing your entity-relationship diagram with collaborators in the Compass or MongoDB Atlas data modeling experience.此文件格式允许您将图表导入Compass,这在Compass或MongoDB Atlas数据建模体验中与合作者共享实体关系图时非常有用。

When you export your diagram as a PNG image, Compass exports the collections and their relationships as they appear in the Data Modeling tab. 当您将图表导出为PNG图像时,Compass会导出显示在“数据建模”选项卡中的集合及其关系。This format helps you share a visual representation of your schema in documentation or presentations.此格式可帮助您在文档或演示文稿中共享模式的可视化表示。

When you export your diagram as a JSON file, it includes:当您将图表导出为JSON文件时,它包括:

  • A collections array with the collection namespaces and their jsonSchema.包含集合命名空间及其jsonSchemacollections数组。
  • A relationships array with the namespaces of the related collections and their linked fields.一个relationships(关系)数组,包含相关集合的命名空间及其链接字段。

Before You Begin开始之前

Before you export your schema visualization, ensure you already generated a diagram.在导出模式可视化之前,请确保您已经生成了一个图表

Steps步骤

1

Open the Data Modeling tab打开“数据建模”选项卡

In the left sidebar, click Data Modeling.在左侧边栏中,单击“数据建模”。

2

Open your entity-relationship diagram打开实体关系图

3

Open the Export data model modal打开“导出数据模型”模态框

In the upper-right corner of your diagram view, click the icon.在图表视图的右上角,单击图标。

4

Select your export file format选择导出文件格式

After you select the file format, click Export.选择文件格式后,单击“导出”。

5

Save your exported file保存导出的文件

Select the location on your filesystem to save your exported file.选择文件系统上的位置以保存导出的文件。

Learn More了解更多