get DDL from Mongo database
MongoDB doesn't have Data Definition Language. In place of &quot;rows&quot; and &quot;columns&quot; it has &quot;objects&quot; and &quot;attributes&quot;. An object is typically not defined or constrained by the storage engine as it would be in a relational database.
The data is not defined by the thing that keeps it but rather by the thing that reads and writes it. For this reason, you can store data about an &quot;Employee&quot; object in the same collection where you also store data about a &quot;Transaction&quot; object. The storage engine won't stop you unless you tell it to.
For MongoDB the Data is Defined by the application, not the database. So you need to go to the application to understand what the equivalent of &quot;DDL&quot; is for the application. Anything you infer from the database is anecdotal and not rigorously constrained.