What would be the equivalent of ERD for a NoSQL database such as MongoDB?
Entity Relationship Diagram (ERD) MongoDB is a non-relational NoSQL database technology, since relationships are not enforced by the database engine. However, data itself contains relationships, and an ER Diagram provides a visualization of these relationships.
NoSQL, unlike SQL which has ER and class diagrams, has neither names nor constraints for data modeling diagrams. The obvious reason is the relaxed rules of NoSQL about relationships, which aim to get a developer started with minimum requirements.
Deducing a Virtual SchemaDbSchema can connect to MongoDB, look in the sample collection records, and deduce a virtual diagram from there. All you have to do is to connect to MongoDB and the tool will deduce the schema automatically. Once the diagram is deduced, the possibilities are endless.
It looks like you asked a similar question on Quora.
As mentioned there, the ERD is simply a mapping of the data you intend to store and the relations amongst that data.
You can still make an ERD with MongoDB as you still want to track the data and the relations. The big difference is that MongoDB has no joins, so when you translate the ERD into an actual schema you'll have to make some specific decisions about implement the relationships.
In particular, you'll need to make the "embed vs. reference" decision when deciding how this data will actually be stored. Relations are still allowed, just not enforced. Many of the wrappers for MongoDB actually provide lookups across collections to abstract some of this complexity.
Even though MongoDB does not enforce a schema, it's not recommended to proceed completely at random. Modeling the data you expect to have in the system is still a really good idea and that's what the ERD provides you.
So I guess the equivalent to the ERD is the ERD?
You could just use a UML class diagram instead too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With