Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why we don't draw ER for NoSQL databses

I know that NoSQL databases for instance MongoDB, can't be modeled using Entity-relationship "ER" diagram because it's schema-less but I can model UML and it kind of shows the relations between the attributes, so what's the difference and why?

like image 341
user8423460 Avatar asked Nov 26 '25 09:11

user8423460


1 Answers

ER diagrams aren't a good fit for document databases. The entity-relationship model supports many-to-many binary as well as ternary and higher relationships, composite keys and attributes on relationships, all of which aren't directly supported in hierarchical/network model DBMSs. It's not too difficult to map from one model to the other if one understands both. However, my experience is that most developers don't even distinguish them, let alone understand them well.

UML class diagrams look a lot like network data models, if you exclude methods. Both are graphs (whereas relational data models are hypergraphs) so the correspondence is much closer. However, class diagrams should be used for modeling systems rather than data. A road map is not the same as an engineering diagram for a car.

like image 129
reaanb Avatar answered Nov 28 '25 01:11

reaanb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!