In this article, we will explain how to connect to AWS Amazon DocumentDB in Moon Modeler and how to automatically create a diagram of an existing database.
What is AWS DocumentDB?
Amazon DocumentDB (with MongoDB compatibility) is a fast, scalable, highly available, and fully managed document database service that supports MongoDB workloads. It implements the Apache 2.0 open source MongoDB 3.6 and 4.0 API by emulating the responses that a MongoDB client expects from a MongoDB server. For more information about Amazon DocumentDB, please visit https://aws.amazon.com/documentdb/
DocumentDB structure created in AWS
Please visit the following page and read the tutorial:
Creating a DocumentDB database connection in Moon Modeler
To create a new connection to the DocumentDB, click the Connections button and then click Create new connection. Enter a name for the connection and enter the DocumentDB connection string to the URL field.
- Start with mongodb://
- Specify URL
- Include the 27017 port number
- Enable the Direct connection option
- Keep the Retry writes option turned off
The path should be specified as:
Then go to the Authentication tab
In the next step, enable SSH and enter the values on the SSH tab.
Enter the host, port, username, and private key path.
Now it’s important to enable TLS. So go to the TLS tab and just enable this option and specify the path to the CA Certificate. Then make sure the Allow invalid hostnames option is enabled.
Now you can go back to the first tab. If you don’t know the name of the database and didn’t fill in this value directly, click on Load databases. A list of available databases will load and you can conveniently select the one you want to visualize with the drop-down element. Then select the database and save the connection settings.
A new database connection is created. Now just click on the Connect and load existing database structure link.
Moon Modeler will load the information from the database and create the project including the diagram.
Editing connection properties
If you need to optimize the speed of reverse engineering, or if you have data without references in the structure, you can change the database connection Settings and run reverse engineering again.
For more information visit page Database connections
Creating documentation for Document DB
Once you have successfully created a project, you can add logical information to it, such as labels, set captions to references, specify estimated sizes, and add other important information to the project that is useful to document or use when communicating with others. You can generate an interactive HTML report for these purposes, or export the diagram to PDF.
Forward engineering and script generation
Another option you have is to generate validation scripts for your DocumentDB schema design.