admin管理员组

文章数量:1403452

MongoDB seems appealing because in JavaScript front-end applications, especially those that leverage Backbone and its collections, all the data and application state is organized in deeply nested JSON structures.

Building a relational DB schema in MySQL can be a pain, because you are essentially breaking down a JSON object into granular tables, determining the foreign keys and restraints. Its a real excessive exercise for someone who doesn't maintain databases for a living.

Will MongoDB address these issues? I assume i could simply save a Backbone Collection if it is structured correctly and be able to join the data later across other related documents? Or is MongoDB overkill and more of a performance machine instead of a document storage solution?

MongoDB seems appealing because in JavaScript front-end applications, especially those that leverage Backbone and its collections, all the data and application state is organized in deeply nested JSON structures.

Building a relational DB schema in MySQL can be a pain, because you are essentially breaking down a JSON object into granular tables, determining the foreign keys and restraints. Its a real excessive exercise for someone who doesn't maintain databases for a living.

Will MongoDB address these issues? I assume i could simply save a Backbone Collection if it is structured correctly and be able to join the data later across other related documents? Or is MongoDB overkill and more of a performance machine instead of a document storage solution?

Share Improve this question asked Feb 21, 2012 at 7:46 AbadabaAbadaba 1,4667 gold badges20 silver badges30 bronze badges 1
  • I have started by latest build using MongoDB and its great for storing documents just as you have said. Having no defined schema is great – Hank Commented Feb 21, 2012 at 7:49
Add a ment  | 

1 Answer 1

Reset to default 6

MongoDB seems appealing because in JavaScript front-end applications, especially those that leverage Backbone and its collections, all the data and application state is organized in deeply nested JSON structures.

Yea, in mongodb you can store any json structure. Nesting is a one of benefits of mongodb. You can store data in natural way without thinking about relations. You can store data directly as your client JavaScript require.

Building a relational DB schema in MySQL can be a pain

It for sure highly depends on structure you want store, but if you talking about deeply nested json structures mongodb will work best for you.

Or is MongoDB overkill and more of a performance machine instead of a document storage solution?

No, mongodb not just performance machine, it is perfect storage for unstructured, deeply nested documents. And in same time mongo have very good performance, especially when working with highly deep documents (because no need join them).

本文标签: javascriptIs MongoDB a good choice for storing JSON structuresStack Overflow