無論你正在搭建一個社交媒體網站還是一個內部使用的企業應用,《MongoDB設計模式(影印版)》這本注重實踐的指南都可以為你展示出在MongoDB和它所用來解決的商業問題之間的緊密聯系。你將學習如何把MongoDB設計模式應用到多個具有挑戰性的領域中,比如電子商務、內容管理和在線游戲。通過使用 Python和JayaScript的代碼實例,你將了解MongoDB 是如何讓你在調整數據模型的同時簡化開發流程。很多商業應用在還沒有理解如何更有效地使用NoSQL數據庫之前就直接啟用了它。這本《MongoDB設計模式( 影印版)》(作者科普蘭)將為你演示文檔嵌入、多態性架構和其他處理特定大數據用例的MongoDB模式的優勢所在,包括:營運智能:執行商業數據的實時分析。電子商務:讓MongoDB成為產品目錄大師或者庫存管理系統。內容管理:學習用來存儲內容節點、二元資產和討論區的方法。在線廣告網絡:把技術運用于廣告播放的頻次控制、關鍵字定位和競價。社交網絡:學習如何存儲一個仿效Google+的復雜社交圖。
在線游戲:為一個多人角色扮演游戲提供對人物和世界數據的并發訪問。
MongoDB是一個介于關系數據庫和非關系數據庫之間的產品,是非關系數據庫當中功能豐富,像關系數據庫的。他支持的數據結構非常松散,是類似json的bson格式,因此可以存儲比較復雜的數據類型。 對于新手和那些想要獲取更多實踐知識的有經驗用戶來說,《MongoDB設計模式(影印版)》(作者科普蘭)都是一本必要的讀物。
Preface Part I.Design Patterns 1.To EmbedOrReference Relational Data Modeling and Normalization What Is a Normal Form,Anyway? So What's the Problem? Denormalizing for Performance MongoDB:Wh0 Needs Normalization.Anyway? MongoDB Document Format Embedding for Locality Embedding for Atomicity and Isolation Referencing for Flexibilitv Referencing for Potentially High--Arity Relationships Many-to-Many Relationships Conclusion 2.PolymorphicSchemas Polymorphic Schemas to SuppoObjectOriented Programming Polymorphic Schemas Enable Schema Evolution Storage(In-)Efficiency ofBSON Polymorphic Schemas SuppoSemiStructured Domain Data Conclusion 3.MimickingTransactional Behavior The Relational Approach to Consistency Compound Documents Using Complex Updates Optimistic Update with Compensation Conclusion Partll.UseCases 4.OperationalIntelligence Storing Log Data Solution 0verview Schema Design Operations Sharding Concerns Managing Event Data Growth PreAggregated Reports Solution 0verview Schema Design Operations Sharding Concerns Hierarchical Aggregation Solution Overview Schema Design MapReduce Operations Sharding Concerns 5.Ecommetce Product Catalog Solution Overview Operations Sharding Concerns Category Hierarchy Solution Overview Schema Design Operations Sharding Concerns Inventory Management Solution 0verview Schema Operations Sharding Concerns 6.ContentManagementSystems Metadata and Asset Management Solution Overview Schema Design Operations Sharding Concerns Storing Comments Solution 0verview Approach:One Document per Comment Approach:Embedding All Comments Approach:Hybrid Schema Design Sharding Concerns 7.OnlineAdvertising Networks Solution Overview Design 1:Basic Ad Serving Schema Design Operation:Choose an Ad to Serve Operation:Make an Ad Campaign Inactive Sharding Concerns Design 2:Adding Frequency Capping Schema Design Operation:Choose an Ad to Serve Sharding Design 3:Keyword Targeting Schema Design Operation:Choose a Group ofAds to Serve 8.SociaI Networking Solution Overview Schema Design Independent Collections Dependent Collections Operations Viewing a News Feed or WaU Posts Commenting on a Post Creating a New Post Maintaining the Social Graph Sharding 9.OnlineGaminq. Solution Overview Schema Design Character Schema Rem Schema Locion Schema Operations Load Character Data from MongoDB Extract Armor and Weapon Data for Display Extract Character Attributes,Inventorand Room Information for Display PickUp anItemfrom aRoom Remove an Item from a Container Move the Character to a Different Room Buy an Item Sharding Afterword Index