- ホーム
- > 洋書
- > 英文書
- > Computer / Databases
Full Description
NoSQL database usage is growing at a stunning 50% per year, as organizations discover NoSQL's potential to address even the most challenging Big Data and real-time database problems. Every NoSQL database is different, but one is the most popular by far: MongoDB.Now, in just 24 lessons of one hour or less, you can learn how to leverage MongoDB's immense power. Each short, easy lesson builds on all that's come before, teaching NoSQL concepts and MongoDB techniques from the ground up. Sams Teach Yourself NoSQL with MongoDB in 24 Hours covers all this, and much more:Learning how NoSQL is different, when to use it, and when to use traditional RDBMSes insteadDesigning and implementing MongoDB databases of diverse types and sizesStoring and interacting with data via Java, PHP, Python, and Node.js/MongooseChoosing the right NoSQL distribution model for your applicationInstalling and configuring MongoDBDesigning MongoDB data models, including collections, indexes, and GridFSBalancing consistency, performance, and durabilityLeveraging the immense power of Map-ReduceAdministering, monitoring, securing, backing up, and repairing MongoDB databasesMastering advanced techniques such as sharding and replicationOptimizing performance
Contents
Introduction 1How This Book Is Organized 1Code Examples 2Special Elements 2Q&A, Quiz, and Exercises 3Part I: Getting Started with NoSQL and MongoDBHOUR 1: Introducing NoSQL and MongoDB 5What Is NoSQL? 6Choosing RDBMS, NoSQL, or Both 7Understanding MongoDB 8MongoDB Data Types 10Planning Your Data Model 11Summary 17Q&A 18Workshop 18HOUR 2: Installing and Configuring MongoDB 21Building the MongoDB Environment 21Accessing the MongoDB HTTP Interface 26Accessing MongoDB from the Shell Client 27Scripting the MongoDB Shell 31Summary 34Q&A 35Workshop 35HOUR 3: Using JavaScript in the MongoDB Shell 37Defining Variables 37Understanding JavaScript Data Types 38Outputting Data in a MongoDB Shell Script 40Using Operators 40Implementing Looping 44Creating Functions 49Understanding Variable Scope 52Using JavaScript Objects 53Manipulating Strings 56Working with Arrays 60Adding Error Handling 65Summary 67Q&A 67Workshop 67Part II: Implementing NoSQL in MongoDB HOUR 4: Configuring User Accounts and Access Control 69Understanding the Admin Database 69Administrating User Accounts 70Configuring Access Control 78Summary 83Q&A 83Workshop 83HOUR 5: Managing Databases and Collections from the MongoDB Shell 85Understanding the Database and Collection Objects 85Managing Databases 91Managing Collections 96Implementing the Example Dataset 100Summary 104Q&A 104Workshop 104HOUR 6: Finding Documents in the MongoDB Collection from the MongoDB Shell 107Understanding the Cursor Object 107Understanding Query Operators 109Getting Documents from a Collection 112Finding Specific Sets of Documents 117Summary 122Q&A 122Workshop 123HOUR 7: Additional Data-Finding Operations Using the MongoDB Shell 125Counting Documents 125Sorting Results Sets 128Limiting Result Sets 130Finding Distinct Field Values 138Summary 141Q&A 141Workshop 141HOUR 8: Manipulating MongoDB Documents in a Collection 143Understanding the Write Concern 143Configuring Database Connection Error Handling 144Getting the Status of Database Write Requests 145Understanding Database Update Operators 146Adding Documents to a Collection in the MongoDB Shell 149Updating Documents in a Collection from the MongoDB Shell 151Saving Documents in a Collection Using the MongoDB Shell 155Upserting Documents in Collections Using the MongoDB Shell 158Deleting Documents from a Collection Using the MongoDB Shell 161Summary 163Q&A 164Workshop 164HOUR 9: Utilizing the Power of Grouping, Aggregation, and Map Reduce 167Grouping Results of Find Operations in the MongoDB Shell 167Using Aggregation to Manipulate the Data During Requests from the MongoDB Shell 171Applying Map Reduce to Generate New Data Results Using the MongoDB Shell 178Summary 183Q&A 184Workshop 184Part III: Using MongoDB in ApplicationsHOUR 10: Implementing MongoDB in Java Applications 185Understanding MongoDB Driver Objects in Java 185Finding Documents Using Java 194Counting Documents in Java 201Sorting Results Sets in Java 203Summary 207Q&A 207Workshop 207HOUR 11: Accessing Data from MongoDB in Java Applications 209Limiting Result Sets Using Java 209Finding a Distinct Field Value in Java 218Grouping Results of Find Operations in Java Applications 221Using Aggregation to Manipulate the Data During Requests from JavaApplications 225Summary 228Q&A 229Workshop 229HOUR 12: Working with MongoDB Data in Java Applications 231Adding Documents from Java 231Removing Documents from Java 236Saving Documents from Java 239Updating Documents from Java 241Upserting Documents from Java 245Summary 249Q&A 249Workshop 249HOUR 13: Implementing MongoDB in PHP Applications 251Understanding MongoDB Driver Objects in PHP 251Finding Documents Using PHP 259Counting Documents in PHP 265Sorting Result Sets in PHP 267Summary 270Q&A 270Workshop 270HOUR 14: Accessing Data from MongoDB in PHP Applications 273Limiting Result Sets Using PHP 273Finding Distinct Field Values in PHP 281Grouping Results of Find Operations in PHP Applications 283Using Aggregation to Manipulate the Data During Requests from PHP Applications 287Summary 290Q&A 290Workshop 290HOUR 15: Working with MongoDB Data in PHP Applications 293Adding Documents from PHP 293Removing Documents from PHP 297Saving Documents from PHP 299Updating Documents from PHP 302Upserting Documents from PHP 305Summary 308Q&A 309Workshop 309HOUR 16: Implementing MongoDB in Python Applications 311Understanding MongoDB Driver Objects in Python 311Finding Documents Using Python 318Counting Documents in Python 324Sorting Result Sets in Python 326Summary 329Q&A 329Workshop 329HOUR 17: Accessing Data from MongoDB in Python Applications 331Limiting Result Sets Using Python 331Finding Distinct Field Value in Python 339Grouping Results of Find Operations in Python Applications 341Using Aggregation to Manipulate the Data During Requests from Python Applications 344Summary 347Q&A 347Workshop 348HOUR 18: Working with MongoDB Data in Python Applications 349Adding Documents from Python 349Removing Documents from Python 353Saving Documents from Python 355Updating Documents from Python 358Upserting Documents from Python 361Summary 364Q&A 364Workshop 365HOUR 19: Implementing MongoDB in Node.js Applications 367Understanding MongoDB Driver Objects in Node.js 367Finding Documents Using Node.js 377Counting Documents in Node.js 383Sorting Results Sets in Node.js 385Summary 388Q&A 389Workshop 389HOUR 20: Accessing Data from MongoDB in Node.js Applications 391Limiting Result Sets Using Node.js 391Finding Distinct Field Value in Node.js 400Grouping Results of Find Operations in Node.js Applications 402Using Aggregation to Manipulate the Data During Requests from Node.js Applications 406Summary 409Q&A 409Workshop 410HOUR 21: Working with MongoDB Data in Node.js Applications 411Adding Documents from Node.js 411Removing Documents from Node.js 416Saving Documents from Node.js 419Updating Documents from Node.js 423Upserting Documents from Node.js 427Summary 431Q&A 431Workshop 431Part IV: Additional MongoDB ConceptsHOUR 22: Database Administration Using the MongoDB Shell 433Working with Databases and Collections 433Working with Indexes 438Understanding Performance and Diagnostic Tasks 443Repairing a MongoDB Database 453Backing Up MongoDB 454Summary 455Q&A 456Workshop 456HOUR 23: Implementing Replication and Sharding in MongoDB 459Applying Replication in MongoDB 459Implementing Sharding in MongoDB 468Summary 479Q&A 479Workshop 479HOUR 24: Implementing a MongoDB GridFS Store 481Understanding the GridFS Store 481Implementing a GridFS in the MongoDB Shell 482Implementing a MongoDB GridFS Using the Java MongoDB Driver 484Implementing a MongoDB GridFS Using the PHP MongoDB Driver 489Implementing a MongoDB GridFS Using the Python MongoDB Driver 494Implementing a MongoDB GridFS Using the Node.js MongoDB Driver 497Summary 502Q&A 502Workshop 502Index 505



