MongoDB in Action cover

MongoDB in Action

Rating 4.2
Word count
256K words
Chapters
20
Series
Turing Programming Series
ISBN
9787115295071

Tags

Summary

MongoDB in Action is a hands-on guide to the document database written by Kyle Banker, an engineer with a background on the official MongoDB team. The Chinese edition was translated by Ding Xuefeng and belongs to the Turing Programming Series. Based on MongoDB 2.0+, the book is divided into three parts. Part 1 begins with how the document-based data model differs from traditional relational databases, then introduces MongoDB's history, key features, core server and tools, and demonstrates collection creation, index building, and basic administration through the JavaScript Shell. It then uses the Ruby driver as an example to explain how drivers work, guiding readers to write a real, runnable program. Part 2 moves into application development around an e-commerce data model: it first covers schema design principles and document modeling, then the query language and aggregation commands, and finally details document updates, atomic operations, and deletion. Part 3 addresses mastery and operations, covering index theory and query optimization, replica set replication, automatic sharding, shard key selection strategies, as well as deployment, monitoring and diagnostics, maintenance, and performance tuning. The appendices add installation and configuration, common design patterns and anti-patterns, binary data and GridFS, usage in PHP, Java, and C++, and spatial indexes. The book is moderate in length and dense with examples, balancing development and operations perspectives, and is suitable for junior and mid-level application developers and DBAs.

Editor's review

很多 MongoDB 入门书只讲 API 有哪些,这本书讲的是这些 API 背后的设计逻辑。作者在 10gen(现 MongoDB Inc.)维护过 Ruby 和 C 官方驱动,对文档模型、查询执行、索引选择、副本集与分片的细节有一手理解,因此书中关于「为什么这样设计」的段落,往往比其他教程更有分量。全书结构清晰:用一个贯穿始终的电子商务案例,从建模、查询、聚合走到更新与原子操作,再把镜头拉远到索引优化、复制与分片,最后落到部署、监控、备份这些真正会让人深夜加班的事情上。它不回避 MongoDB 的边界和局限,这一点对做技术选型的人尤其有用。中文版译文顺畅,代码示例完整可跑。需要提醒的是,本书面向 MongoDB 2.0+,与今天的产品形态已有时差,最好把它当作理解文档数据库思维方式的必读经典,而非最新版本的操作手册。

Who it's for

A good fit for

  • 已有 SQL 基础,想转向文档数据库的后端开发者
  • 需要用 MongoDB 支撑业务、关心建模与查询性能的程序员
  • 负责副本集与分片集群部署、运维的 DBA 及运维工程师
  • 做技术选型、需要判断 MongoDB 适用边界的架构师

Not a good fit for

  • 零编程基础、尚未接触任何数据库的入门读者
  • 需要最新 MongoDB 版本(如事务、Atlas 云服务)操作指南的读者
  • 只关心 MySQL 等关系型数据库优化的读者

Reading tips

  1. 先读第1—3章建立整体印象,并动手在本地跑通 Shell 示例,再进入建模部分
  2. 第4—6章的电商案例建议跟着敲一遍代码,这是全书对建模思路最有帮助的部分
  3. 把第7—9章当作查询优化与集群设计的参考手册,遇到性能问题再回头精读
  4. 阅读时对照当前 MongoDB 官方文档核对版本差异,避免把旧版本行为当作现状

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Translator's Preface
  2. Foreword
  3. Part 1 Getting Started
  4. Chapter 1 A Database for the Modern Web
  5. Chapter 2 MongoDB through the JavaScript Shell
  6. Chapter 3 Writing Programs Using MongoDB
  7. Part 2 MongoDB and Application Development
  8. Chapter 4 Document-Oriented Data
  9. Chapter 5 Querying and Aggregation
  10. Chapter 6 Updates, Atomic Operations, and Deletes
  11. Part 3 Mastering MongoDB
  12. Chapter 7 Indexes and Query Optimization
  13. Chapter 8 Replication
  14. Chapter 9 Sharding
  15. Chapter 10 Deployment and Administration
  16. Appendix A Installation
  17. Appendix B Design Patterns
  18. Appendix C Binary Data and GridFS
  19. Appendix D MongoDB in PHP, Java, and C++
  20. Appendix E Spatial Indexes

FAQ

《MongoDB实战》的作者是谁?
原书 MongoDB in Action 由 Kyle Banker 撰写,他曾任职于 10gen(现 MongoDB Inc.),负责维护 Ruby 与 C 语言的官方 MongoDB 驱动;中文版由丁雪丰翻译。
这本书对应哪个 MongoDB 版本?
中文版基于 MongoDB 2.0+ 编写,2012 年由人民邮电出版社出版。书中未涉及后来版本引入的多文档事务等特性,阅读时需结合当前官方文档核对。
书里用的是什么编程语言举例?
正文主要通过 JavaScript Shell 与 Ruby 驱动演示,附录 D 另外补充了 PHP、Java 和 C++ 中连接和使用 MongoDB 的示例。
已有《MongoDB权威指南》,还要读这本吗?
两者侧重不同:《权威指南》偏管理与操作速查,本书更强调数据建模、查询设计与副本集、分片的原理与实战,可作为互补阅读。
这本和 2017 年的第二版有什么区别?
第二版(华中科技大学出版社,2017)由 Kyle Banker 等多位作者重写,面向 MongoDB 3.0,示例与内容更贴近新版本;2012 年这本是初版的第一个中文译本。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category