Search code examples
mongodbdiagramdatabase

How to draw a MongoDB diagram


I am recently working on a django project documentation which uses MongoDB. So I need to know how to make some clear diagrams of the MongoDB collections.

I understand that there's no fixed form to do it due to the MongoDB's flexible nature, but my records in each collection follows certain order and rule defined by the collection while some of the collection records contain inner documents.

So, is something like this the most proper way, or there's more standard way to show my MongoDB collections to other developers or package users?


Solution

  • I would sugguest the tree mode.

    collection
    `-- _id
    `-- field1
    `-- field2
        `-- f1
        `-- f2
    `-- field3