LEONEL KREA
← All reviews
Stack

MongoDB

4.0 / 5
MongoDB

A document database: data is stored as JSON, in the same shape it has in the code. On this site it underpins authentication and the Laboratorio's live experiments.

MongoDB stores documents in the natural shape of your data: a game of the Laboratorio's role-playing game is a document, with its players inside, not a constellation of tables with joins. For prototyping and for domains that change often, that flexibility is welcome.

On this site it handles authentication and the state of the experiments, with very practical details like TTL indexes: you tell it a game expires in 60 days and Mongo deletes it on its own. Flexibility has its flip side: without schema discipline (here, validation with Zod and types), the database ends up being a box of surprises.

PROS

  • Data lives in the shape it has in the code
  • Fast to prototype and evolve the model
  • Useful details out of the box (TTL, free Atlas to get started)

CONS

  • Flexibility without discipline degenerates into data chaos
  • For highly relational data, classic SQL fits better

Want to know more?

Take a look and draw your own conclusions.

Learn more