You can use Generative AI to generate scripts during the Reverse Engineering process. This section walks you through the process of reverse engineering a MongoDB model from scripts using AI as an example. Similarly, you can reverse engineer data models for other target databases. You can use GenAI in the following scenario:
You can describe the models that you want to generate to the AI assistant. Based on the description, AI generates a script and the corresponding model. For example, to create a healthcare industry-based model, you can describe the model as follows:
"Create a MongoDB schema for a hospital system with patients, doctors, appointments, and prescriptions."
To generate DDL scripts and models using AI, follow these steps:
In erwin Data Modeler (erwin DM), click Actions > Reverse Engineer.
The New Model screen appears.
Click Logical/Physical and select a Database.
Click Next.
The Reverse Engineering Wizard appears.
Select the Enable AI Prompt Input checkbox. Clicking this option enables the prompt box.
Enter your model description in the AI prompt box. For example, Create a MongoDB schema for a hospital system with patients, doctors, appointments, and prescriptions.
Click AI Generate.
The AI-generated script based on your description is displayed. You can review, edit, save, and reuse this script.
Click Ok.
Enter appropriate values in the fields for the other tabs.
Click Ok.
The reverse engineering process starts.
Once the process is complete, a schema and a model are generated based on your selections.
You can also use the following options on the AI-generated script:
Search (): Use this option to search for a word or characters in the schema.
Save (): Use this option to save the generated script.
Copy (): Use this option to copy the script.
Replace (): Use this option to find and replace characters in the script.
Text Options (): Use this option to configure the preview text editor's look and feel, such as window, font, and syntax color settings.
AI Terms of Use: Use this option to view terms and conditions for AI-powered features in erwin DM.
Was this helpful?: Use this option to provide feedback on the AI-generated script. Click or
to submit positive or negative feedback.