𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

MongoDB in action

✍ Scribed by Banker, Kyle


Publisher
Manning Publications
Year
2011;2012
Tongue
English
Leaves
311
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Summary

MongoDB in Actionis a comprehensive guide to MongoDB for application developers. The book begins by explaining what makes MongoDB unique and describing its ideal use cases. A series of tutorials designed for MongoDB mastery then leads into detailed examples for leveraging MongoDB in e-commerce, social networking, analytics, and other common applications.

About the TechnologyBig data can mean big headaches. MongoDB is a document-oriented database designed to be flexible, scalable, and very fast, even with big data loads. It's built for high availability, supports rich, dynamic schemas, and lets you easily distribute data across multiple servers.

About this BookMongoDB in Actionintroduces you to MongoDB and the document-oriented database model. This perfectly paced book provides both the big picture you'll need as a developer and enough low-level detail to satisfy a system engineer. Numerous examples will help you develop confidence in the crucial area of data modeling. You'll also love the deep explanations of each feature, including replication, auto-sharding, and deployment

This book is written for developers. No MongoDB or NoSQL experience required.

Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.

What's Inside
Indexes, queries, and standard DB operations Map-reduce for custom aggregations and reporting Schema design patterns Deploying for scale and high availability

Table of Contents


PART 1 GETTING STARTED A database for the modern web MongoDB through the JavaScript shell Writing programs using MongoDB PART 2 APPLICATION DEVELOPMENT IN MONGODB Document-oriented data Queries and aggregation Updates, atomic operations, and deletes PART 3 MONGODB MASTERY Indexing and query optimization Replication Sharding Deployment and administration

✦ Table of Contents


MongoDB in Action......Page 1
brief contents......Page 8
contents......Page 10
preface......Page 16
acknowledgments......Page 18
How to use this book......Page 19
Code conventions and downloads......Page 20
Author Online......Page 21
about the cover illustration......Page 22
Part 1 Getting started......Page 24
Chapter 1 A database for the modern web......Page 26
1.2.1 The document data model......Page 28
1.2.2 Ad hoc queries......Page 31
1.2.4 Replication......Page 33
1.2.5 Speed and durability......Page 34
1.2.6 Scaling......Page 35
1.3 MongoDB’s core server and tools......Page 36
1.3.2 The JavaScript shell......Page 37
1.3.3 Database drivers......Page 38
1.4 Why MongoDB?......Page 39
1.4.1 MongoDB versus other databases......Page 40
1.4.2 Use cases and production deployments......Page 42
1.5 Tips and limitations......Page 44
1.6 Summary......Page 45
Chapter 2 MongoDB through the JavaScript shell......Page 46
2.1.1 Starting the shell......Page 47
2.1.2 Inserts and queries......Page 48
2.1.3 Updating documents......Page 49
2.1.4 Deleting data......Page 51
2.2.1 Creating a large collection......Page 52
2.2.2 Indexing and explain()......Page 54
2.3.1 Getting database information......Page 56
2.3.2 How commands work......Page 57
2.4 Getting help......Page 58
2.5 Summary......Page 59
Chapter 3 Writing programs using MongoDB......Page 60
3.1.1 Installing and connecting......Page 61
3.1.2 Inserting documents in Ruby......Page 62
3.1.3 Queries and cursors......Page 63
3.1.4 Updates and deletes......Page 64
3.1.5 Database commands......Page 65
3.2.1 Object ID generation......Page 66
3.2.2 BSON......Page 67
3.2.3 Over the network......Page 68
3.3.1 Setting up......Page 70
3.3.2 Gathering data......Page 71
3.3.3 Viewing the archive......Page 73
3.4 Summary......Page 75
Part 2 Application development in MongoDB......Page 76
Chapter 4 Document-oriented data......Page 78
4.1 Principles of schema design......Page 79
4.2 Designing an e-commerce data model......Page 80
4.2.1 Products and categories......Page 81
4.2.2 Users and orders......Page 84
4.2.3 Reviews......Page 87
4.3.1 Databases......Page 88
4.3.2 Collections......Page 90
4.3.3 Documents and insertion......Page 93
4.4 Summary......Page 98
Chapter 5 Queries and aggregation......Page 99
5.1.1 Products, categories, and reviews......Page 100
5.1.2 Users and orders......Page 102
5.2.1 Query selectors......Page 104
5.2.2 Query options......Page 113
5.3.1 Grouping reviews by user......Page 115
5.3.2 Map-reduce for orders by region......Page 117
5.4.1 Maxima and minima......Page 118
5.4.3 Group......Page 119
5.4.4 Map-reduce......Page 121
5.5 Summary......Page 123
Chapter 6 Updates, atomic operations, and deletes......Page 124
6.1 A brief tour of document updates......Page 125
6.2.1 Products and categories......Page 127
6.2.2 Reviews......Page 131
6.2.3 Orders......Page 133
6.3.1 Order state transitions......Page 135
6.3.2 Inventory management......Page 137
6.4.1 Update types and options......Page 141
6.4.2 Update operators......Page 142
6.4.3 The findAndModify command......Page 146
6.4.5 Concurrency, atomicity, and isolation......Page 147
6.4.6 Update performance notes......Page 148
6.5 Summary......Page 149
Part 3 MongoDB mastery......Page 150
Chapter 7 Indexing and query optimization......Page 152
7.1.1 A thought experiment......Page 153
7.1.2 Core indexing concepts......Page 156
7.1.3 B-trees......Page 159
7.2 Indexing in practice......Page 160
7.2.1 Index types......Page 161
7.2.2 Index administration......Page 163
7.3.1 Identifying slow queries......Page 167
7.3.2 Examining slow queries......Page 170
7.3.3 Query patterns......Page 176
7.4 Summary......Page 178
Chapter 8 Replication......Page 179
8.1.1 Why replication matters......Page 180
8.1.2 Replication use cases......Page 181
8.2.1 Setup......Page 182
8.2.2 How replication works......Page 186
8.2.3 Administration......Page 192
8.4.1 Connections and failover......Page 200
8.4.2 Write concern......Page 202
8.4.3 Read scaling......Page 204
8.4.4 Tagging......Page 205
8.5 Summary......Page 206
Chapter 9 Sharding......Page 207
9.1.1 What sharding is......Page 208
9.1.2 How sharding works......Page 210
9.2 A sample shard cluster......Page 213
9.2.1 Setup......Page 214
9.2.2 Writing to a sharded cluster......Page 218
9.3.1 Shard query types......Page 223
9.3.2 Indexing......Page 227
9.4.1 Ineffective shard keys......Page 228
9.4.2 Ideal shard keys......Page 230
9.5.1 Deployment and configuration......Page 231
9.5.2 Administration......Page 235
9.6 Summary......Page 240
Chapter 10 Deployment and administration......Page 241
10.1.1 Deployment environment......Page 242
10.1.2 Server configuration......Page 246
10.1.3 Data imports and exports......Page 248
10.1.4 Security......Page 249
10.2.1 Logging......Page 251
10.2.2 Monitoring tools......Page 252
10.2.3 External monitoring applications......Page 255
10.2.4 Diagnostic tools (mongosniff, bsondump)......Page 256
10.3.1 Backups and recovery......Page 257
10.3.2 Compaction and repair......Page 258
10.3.3 Upgrading......Page 259
10.4 Performance troubleshooting......Page 260
10.4.2 Add RAM......Page 261
10.4.4 Scale horizontally......Page 262
10.5 Summary......Page 263
A.1.1 MongoDB on Linux......Page 264
A.1.2 MongoDB on Mac OS X......Page 265
A.1.3 MongoDB on Windows......Page 267
A.1.5 Troubleshooting......Page 268
A.2 Basic configuration options......Page 269
A.3.1 Linux and Mac OS X......Page 270
A.3.2 Windows......Page 271
B.1.2 One-to-many......Page 272
B.1.3 Many-to-many......Page 273
B.1.4 Trees......Page 274
B.1.5 Worker queues......Page 277
B.1.6 Dynamic attributes......Page 278
B.1.7 Transactions......Page 279
B.1.8 Locality and precomputation......Page 280
B.2.4 Large, deeply nested documents......Page 281
B.2.6 Unshardable collections......Page 282
C.1.1 Storing a thumbnail......Page 283
C.1.2 Storing an MD5......Page 284
C.2.1 GridFS in Ruby......Page 285
C.2.2 GridFS with mongofiles......Page 288
D.1.1 Documents......Page 289
D.1.3 Sample program......Page 290
D.2.1 Documents......Page 291
D.2.3 Sample program......Page 292
D.3.1 Documents......Page 293
D.3.3 Sample program......Page 295
E.1 Spatial indexing basics......Page 297
E.2 Advanced queries......Page 299
E.3 Compound spatial indexes......Page 300
E.4 Spherical geometry......Page 301
A......Page 302
D......Page 303
G......Page 304
K......Page 305
P......Page 306
R......Page 307
S......Page 308
V......Page 309
Y......Page 310
back cover......Page 311

✦ Subjects


Computer Science;Programming;Software;Science;Technology;Computers;Technical


πŸ“œ SIMILAR VOLUMES


MongoDB in Action
✍ Kyle Banker πŸ“‚ Library πŸ“… 2011 πŸ› Manning Publications 🌐 English

SummaryMongoDB in Action is a comprehensive guide to MongoDB for application developers. The book begins by explaining what makes MongoDB unique and describing its ideal use cases. A series of tutorials designed for MongoDB mastery then leads into detailed examples for leveraging MongoDB in e-commer

MongoDB in Action
✍ Kyle Banker πŸ“‚ Library πŸ“… 2011 πŸ› Manning Publications 🌐 English

MongoDB in Action is a comprehensive guide to MongoDB for application developers. The book begins by explaining what makes MongoDB unique and describing its ideal use cases. A series of tutorials designed for MongoDB mastery then leads into detailed examples for leveraging MongoDB in e-commerce, soc

MongoDB in Action
✍ Kyle Banker πŸ“‚ Library πŸ“… 2011 πŸ› Manning Publications 🌐 English
MongoDB in Action
✍ Kyle Banker πŸ“‚ Library πŸ“… 2011 πŸ› Manning 🌐 English

MongoDB in Action is a comprehensive guide to MongoDB for application developers. The book begins by explaining what makes MongoDB unique and describing its ideal use cases. A series of tutorials designed for MongoDB mastery then leads into detailed examples for leveraging MongoDB in e-commerce, soc

MongoDB in Action: Covers MongoDB versio
✍ Kyle Banker, Peter Bakkum, Shaun Verch, Doug Garrett, Tim Hawkins πŸ“‚ Library πŸ“… 2016 πŸ› Manning Publications 🌐 English

<div><p><b>Summary</b></p> <p/><i>MongoDB in Action, Second Edition</i> is a completely revised and updated version. It introduces MongoDB 3.0 and the document-oriented database model. This perfectly paced book gives you both the big picture you'll need as a developer and enough low-level detail to

MongoDB in Action: Covers MongoDB versio
✍ Kyle Banker, Peter Bakkum, Shaun Verch, Doug Garrett, Tim Hawkins πŸ“‚ Library πŸ“… 2016 πŸ› Manning Publications 🌐 English

<div><p><b>Summary</b></p> <p/><i>MongoDB in Action, Second Edition</i> is a completely revised and updated version. It introduces MongoDB 3.0 and the document-oriented database model. This perfectly paced book gives you both the big picture you'll need as a developer and enough low-level detail to