1

I've mainly studied SQL structures, and I know that the representation of the entities can look something like this:

enter image description here

However, I'm building this app with MongoDB, so NoSQL DB. I'm aware that MongoDB is non relational. Is there a standard way of representing these kind of databases?

Is it possible to use the previous format to represent my entities?

1 Answer 1

1

Yes, an UML class diagram is still relevant in a MongoDB context.

An entity is a class of domain objects, and regardless the database technology or the persistence format, ultimately you still manage objects:

  • In a relational model, you need to segregate object by classes and squeeze this classes into one or several tables.
  • In a document oriented DB model, the objects are persisted in an object composition friendly format that easily allow to group objects that belong together via nesting.

You’ll find here some more arguments. And on StackOverflow you’ll find how this question relate to Json schemas and mapping documents to class diagrams.

Not the answer you're looking for? Browse other questions tagged or ask your own question.