|
|
|
|
|
by cryptos
1863 days ago
|
|
The argument that a schemaless DB would be easier for developers is pretty much the same argument that a programming language with dynamic tpying would be easier than a language with static typing. That might be true in the short term, but just like static typing a schema helps in the long run. Types and schemas make explicit what would otherwise be implicit knowledge and help to catch bugs early. |
|
You always need to know what kind of data you are dealing with. If you use mongodb, you no longer have the database as the source of truth for the shape of your data, so you need to maintain this somewhere else, whether it be in mongoose models, in your API layer or just in your frontend. The point is that you aren't solving a problem as much as pushing it around, and usually pushing it around results in it being handled in the wrong place(like the frontend).