V
V
Valeriy Donika2015-10-19 22:56:59
MongoDB
Valeriy Donika, 2015-10-19 22:56:59

MongoDB or Mongoose?

I watch a bunch of tutorials on the MEAN stack. Mongoose is used everywhere. Is it just that MongoDB without Mongoose is not used or what? I can't even find an example of how to create schemas like here for example
mongoosejs.com/docs/validation.html
Why is that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2015-10-20
@Valonix

I can't even find an example of how to create schemas

Because mongodb knows nothing about schemas. She is schemaless, and this is written on her forehead with an arial of 36 points.
It is quite possible to go directly to mongodb (mongoose does it through this package ), it's just that ODM is still more convenient to live with.
You can attach validation to your business logic yourself using a package with the telling name validator or using JSON Schema (there are also packages).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question