官术网_书友最值得收藏!

Various performance facets

Other than the JavaScript-friendly nature, one other resemblance between MongoDB and Node.js is that MongoDB is also designed with highly concurrent applications with heavy read operations in mind.

MongoDB also introduces the concept of sharding, which makes it possible to scale the database horizontally as well as vertically. If the application owner needs to increase the database capabilities, they could add more machines into the stack. This is a cheaper option compared to investing in the RAM of a single machine, which will be the case in RDBMS solutions.

The process of Indexing created a list of values called index for a chosen field. These indexes are used to query larger chunks of data. Using indexes accelerates the data retrieval speed and performance. The MongoDB client provides various methods like ensureIndex to create an index only if one doesn't exist.

Additionally, MongoDB has various commands to allow aggregation of data, such as group, count, and return distinct values.

All the advantages that we discussed come with some impact on the consistency, as MongoDB does not strictly adhere to the RDBMS standards like ACID transactions. Also, if you end up creating a data model that might need too many JOIN operations, then MongoDB won't make a good fit as it is not designed with too many aggregations, even though the aggregations are possible via the MongoDB aggregation framework. MongoDB may or may not be the right solution for your application. You should truly weigh the pros and cons of each technology before making a decision to determine which technology is right for you.

主站蜘蛛池模板: 鲁甸县| 寿光市| 雷山县| 沅陵县| 宜川县| 凤山县| 田林县| 邹城市| 仁化县| 鹰潭市| 铅山县| 临江市| 太保市| 赤壁市| 讷河市| 黎城县| 长垣县| 津南区| 余姚市| 措美县| 历史| 襄樊市| 承德市| 商城县| 普安县| 磴口县| 辽阳县| 隆昌县| 天长市| 台中县| 林口县| 大埔县| 崇义县| 宝丰县| 获嘉县| 新密市| 开封市| 东丰县| 嘉义县| 梧州市| 界首市|