Manage your data in a database system designed to support modern application development. The updated edition of this authoritative and accessible guide shows you the many advantages of using document-oriented databases, including how this secure, high-performance system enables flexible data models, high availability, and horizontal scalability.
Written by current and former members of the MongoDB team, the third edition is updated for MongoDB 3.6. You’ll find substantial updates on querying, indexing, aggregation, replica sets, ops manager, sharding administration, data administration, durability, monitoring, and security.
Authors Shannon Bradshaw (MongoDB) and Kristina Chodorow (Google) provide guidance for database developers, advanced configuration for system administrators, and use cases for a variety of projects. Ideal for NoSQL newcomers and experienced MongoDB users alike, this book also includes many real-world schema design examples.
Author(s): Shannon Bradshaw, Kristina Chodorow
SummaryMongoDB in Action, Second Edition 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 satisfy system engineers.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
About the Technology
This document-oriented database was built for high availability, supports rich, dynamic schemas, and lets you easily distribute data across multiple servers. MongoDB 3.0 is flexible, scalable, and very fast, even with big data loads.
About the Book
MongoDB in Action, Second Edition 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 satisfy system engineers. Lots of 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.
About the Reader
Written for developers. No previous MongoDB or NoSQL experience is assumed.
About the Authors
After working at MongoDB, Kyle Banker is now at a startup. Peter Bakkum is a developer with MongoDB expertise. Shaun Verch has worked on the core server team at MongoDB. A Genentech engineer, Doug Garrett is one of the winners of the MongoDB Innovation Award for Analytics. A software architect, Tim Hawkins has led search engineering at Yahoo Europe. Technical Contributor: Wouter Thielen. Technical Editor: Mihalis Tsoukalos.
Table of Contents
- A database for the modern web
- Writing programs using MongoDB
- Document-oriented data
- Constructing queries
- Updates, atomic operations, and deletes
- Indexing and query optimization
- Text search
- WiredTiger and pluggable storage
- Scaling your system with sharding
- Deployment and administration
PART 1 GETTING STARTED
PART 2 APPLICATION DEVELOPMENT IN MONGODB
PART 3 MONGODB MASTERY
Author(s): Kyle Banker, Peter Bakkum
- Master the advanced modeling, querying, and administration techniques in MongoDB and become a MongoDB expert
- Covers the latest updates and Big Data features frequently used by professional MongoDB developers and administrators
- If your goal is to become a certified MongoDB professional, this book is your perfect companion
MongoDB has grown to become the de facto NoSQL database with millions of users—from small startups to Fortune 500 companies. Addressing the limitations of SQL schema-based databases, MongoDB pioneered a shift of focus for DevOps and offered sharding and replication maintainable by DevOps teams. The book is based on MongoDB 3.x and covers topics ranging from database querying using the shell, built in drivers, and popular ODM mappers to more advanced topics such as sharding, high availability, and integration with big data sources.
You will get an overview of MongoDB and how to play to its strengths, with relevant use cases. After that, you will learn how to query MongoDB effectively and make use of indexes as much as possible. The next part deals with the administration of MongoDB installations on-premise or in the cloud. We deal with database internals in the next section, explaining storage systems and how they can affect performance. The last section of this book deals with replication and MongoDB scaling, along with integration with heterogeneous data sources. By the end this book, you will be equipped with all the required industry skills and knowledge to become a certified MongoDB developer and administrator.
What you will learn
- Get hands-on with advanced querying techniques such as indexing, expressions, arrays, and more.
- Configure, monitor, and maintain highly scalable MongoDB environment like an expert.
- Master replication and data sharding to optimize read/write performance.
- Design secure and robust applications based on MongoDB.
- Administer MongoDB-based applications on-premise or in the cloud
- Scale MongoDB to achieve your design goals
- Integrate MongoDB with big data sources to process huge amounts of data
About the Author
Alex Giamas is a Senior Software Engineer at the Department for International Trade, UK Government. He has also worked as a consultant for various startups. He is an experienced professional in systems engineering, NoSQL and big data technologies, with experience spanning from co-founding a digital health startup to Fortune 15 companies.
He has been developing using MongoDB since 2009 and early 1.x versions, using it for several projects around data storage and analytical processing. He has been developing in Apache Hadoop since 2007 while working on its incubation.
He has worked with a wide array of NoSQL and big data technologies, building scalable and highly available distributed software systems in C++, Java, Ruby and Python.
Alex holds an MSc from Carnegie Mellon University in Information Networking and has attended professional courses in Stanford University. He is a graduate from National Technical University of Athens, Greece in Electrical and Computer Engineering. He is a MongoDB Certified developer, a Cloudera Certified Developer for Apache Hadoop and Data Science essentials.
He publishes regularly for the past 4 years at InfoQ in NoSQL, big data and data science topics.
Table of Contents
- MongoDB – A Database for Modern Web
- Schema Design and Data modelling
- MongoDB CRUD operations
- Advanced Querying
- Monitoring, Backup and Security
- Storage Engines
- Harnessing BigData with MongoDB
- Fault Tolerance and Availability
Author(s): Alex Giamas
MongoDB gives flexibility in compare to RDBMS. It has features like dynamic schemas, storage for large volume data, scaling database architecture, real-time data reporting, data sharding, and so on. It enables to develop application faster. To address all these features in a concise manner, this e-book is created.
This e-book has explained features of MongoDB, that is important from the point of Big data analytics. It makes clear the confusion over MySQL and NoSQL working pattern. It has accommodated all the topics on MongoDB with examples. It guides you right through setting up MongoDB environment to security requirements. The book is too small, but all important aspect of MongoDB is covered. The examples and code are explained in a manner that beginners can easily absorb the content. The book has also illustrated various shell commands to access MongoDB. Not only that, but the user will also explore about JSON document and creating queries in MongoDB.
The book can be used for further reference for application build on MongoDB Java or MongoDB Python. Minimum price range and maximum deliverable is the main plus point of this e-book.
Chapter 1: Introduction
Chapter 2: Download and Install MongoDB on Windows
Download & Install MongoDB on Windows
Install Robomongo- MongoDB Management Tool
MongoDB Configuration, Import and Export
Configuring MongoDB server with configuration file
Chapter 3: Create Database & Insert Data
Creating a database
Creating a collection
Chapter 4: Add MongoDB Array using insert()
Chapter 5: ObjectId()
Chapter 6: Query Document using find()
Chapter 7: Cursor
Chapter 8: Query Modifications using limit(), sort()
Chapter 9: Count() & remove() function
Chapter 10: Update() Document
Chapter 11: Indexing, Monitoring & Backup
Chapter 12: How to Create User in Mongodb & assign Roles
Chapter 13: Authentication with Kerberos
Chapter 14: Replica Set
Replica Set: Adding the First Member using rs.initiate()
Replica Set: Adding a Secondary using rs.add()
Replica Set: Reconfiguring or Removing using rs.remove()
Troubleshooting Replica Sets
Chapter 15: Sharded Cluster
Chapter 16: Indexing – createIndex()
Understanding Impact of Indexes
Chapter 17: Regular Expression (Regex)
Using $regex operator for Pattern matching
Pattern Matching with $options
Pattern matching without the regex operator
Fetching last ‘n’ documents from a collection
Author(s): Krishna Rungta
5. Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems (2017)
Data is at the center of many challenges in system design today. Difficult issues need to be figured out, such as scalability, consistency, reliability, efficiency, and maintainability. In addition, we have an overwhelming variety of tools, including relational databases, NoSQL datastores, stream or batch processors, and message brokers. What are the right choices for your application? How do you make sense of all these buzzwords?
In this practical and comprehensive guide, author Martin Kleppmann helps you navigate this diverse landscape by examining the pros and cons of various technologies for processing and storing data. Software keeps changing, but the fundamental principles remain the same. With this book, software engineers and architects will learn how to apply those ideas in practice, and how to make full use of data in modern applications.
- Peer under the hood of the systems you already use, and learn how to use and operate them more effectively
- Make informed decisions by identifying the strengths and weaknesses of different tools
- Navigate the trade-offs around consistency, scalability, fault tolerance, and complexity
- Understand the distributed systems research upon which modern databases are built
- Peek behind the scenes of major online services, and learn from their architectures
Author(s): Martin Kleppmann
Many businesses launch NoSQL databases without understanding the techniques for using their features most effectively. This book demonstrates the benefits of document embedding, polymorphic schemas, and other MongoDB patterns for tackling specific big data use cases, including:
- Operational intelligence: Perform real-time analytics of business data
- Ecommerce: Use MongoDB as a product catalog master or inventory management system
- Content management: Learn methods for storing content nodes, binary assets, and discussions
- Online advertising networks: Apply techniques for frequency capping ad impressions, and keyword targeting and bidding
- Social networking: Learn how to store a complex social graph, modeled after Google+
- Online gaming: Provide concurrent access to character and world data for a multiplayer role-playing game
Author(s): Rick Copeland
Node.js, MongoDB and AngularJS Web Development
The definitive guide to building using the MEAN stack to build web applications
Node.js, MongoDB and AngularJS Web Development is a complete guide for web programmers who want to integrate these three technologies into full working solutions. It begins with concise, crystal-clear tutorials on each of the three technologies and then quickly moves on to building several common web applications.
Readers will learn how to use Node.js and MongoDB to build more scalable, high-performance sites, how to leverage AngularJS's innovative MVC approach to structure more effective pages and applications, and how to use all three together to deliver outstanding next-generation Web solutions.
- Implement a highly scalable and dynamic web server using Node.js and Express
- Implement a MongoDB data store for your web applications
- Define static and dynamic web routes and implement server-side scripts to support them
- Implement Express in Node.js
- Create Jade templates
- Define your own custom AngularJS directives that extend the HTML language
- Implement client-side services that can interact with the Node.js web server
- Build dynamic browser views that provide rich user interaction
- Add authenticated user accounts to your web applications
- Add nested comment components to your web pages
- Build an end-to-end shopping cart
Contents at a Glance
Part I: Getting Started
1 Introducing the Node.js-to-AngularJS Stack
Part II: Learning Node.js
3 Getting Started with Node.js
4 Using Events, Listeners, Timers, and Callbacks in Node.js
5 Handling Data I/O in Node.js
6 Accessing the File System from Node.js
7 Implementing HTTP Services in Node.js
8 Implementing Socket Services in Node.js
9 Scaling Applications Using Multiple Processors in Node.js
10 Using Additional Node.js Modules
Part III: Learning MongoDB
11 Understanding NoSQL and MongoDB
12 Getting Started with MongoDB
13 Getting Started with MongoDB and Node.js
14 Manipulating MongoDB Documents from Node.js
15 Accessing MongoDB Documents from Node.js
16 Using Mongoose for Structured Schema and Validation
17 Advanced MongoDB Concepts
Part IV: Using Express to Make Life Easier
18 Implementing Express in Node.js
19 Implementing Express Middleware
Part V: Learning AngularJS
20 Getting Started with AngularJS
21 Understanding AngularJS Modules and Dependency Injection
22 Implementing the Scope as a Data Model
23 Using AngularJS Templates to Create Views
24 Implementing Directives in AngularJS Views
25 Implementing AngularJS Services in Web Applications
Part VI: Building Practical Web Application Components
26 Adding User Accounts to Your Website
27 Adding Comment Threads to Pages
28 Creating Your Own Shopping Cart
29 Building Interactive Web 2.0 Application Components
Author(s): Brad Dayley
Learn how to leverage MongoDB with your Python applications, using the hands-on recipes in this book. You get complete code samples for tasks such as making fast geo queries for location-based apps, efficiently indexing your user documents for social-graph lookups, and many other scenarios.
This guide explains the basics of the document-oriented database and shows you how to set up a Python environment with it. Learn how to read and write to MongoDB, apply idiomatic MongoDB and Python patterns, and use the database with several popular Python web frameworks. You’ll discover how to model your data, write effective queries, and avoid concurrency problems such as race conditions and deadlocks.
The recipes will help you:
- Read, write, count, and sort documents in a MongoDB collection
- Learn how to use the rich MongoDB query language
- Maintain data integrity in replicated/distributed MongoDB environments
- Use embedding to efficiently model your data without joins
- Code defensively to avoid keyerrors and other bugs
- Apply atomic operations to update game scores, billing systems, and more with the fast accounting pattern
- Use MongoDB with the Pylons 1.x, Django, and Pyramid web frameworks
Author(s): Niall O’Higgins
9. MongoDB Cookbook – Second Edition (2016)
Harness the latest features of MongoDB 3 with this collection of 80 recipes – from managing cloud platforms to app development, this book is a vital resource
About This Book
- Get to grips with the latest features of MongoDB 3
- Interact with the MongoDB server and perform a wide range of query operations from the shell
- From administration to automation, this cookbook keeps you up to date with the world’s leading NoSQL database
Who This Book Is For
This book is engineered for anyone who is interested in managing data in an easy and efficient way using MongoDB. You do not need any prior knowledge of MongoDB, but it would be helpful if you have some programming experience in either Java or Python.
What You Will Learn
- Install, configure, and administer MongoDB sharded clusters and replica sets
- Begin writing applications using MongoDB in Java and Python languages
- Initialize the server in three different modes with various configurations
- Perform cloud deployment and introduce PaaS for Mongo
- Discover frameworks and products built to improve developer productivity using Mongo
- Take an in-depth look at the Mongo programming driver APIs in Java and Python
- Set up enterprise class monitoring and backups of MongoDB
MongoDB is a high-performance and feature-rich NoSQL database that forms the backbone of the systems that power many different organizations – it’s easy to see why it’s the most popular NoSQL database on the market. Packed with many features that have become essential for many different types of software professionals and incredibly easy to use, this cookbook contains many solutions to the everyday challenges of MongoDB, as well as guidance on effective techniques to extend your skills and capabilities.
This book starts with how to initialize the server in three different modes with various configurations. You will then be introduced to programming language drivers in both Java and Python. A new feature in MongoDB 3 is that you can connect to a single node using Python, set to make MongoDB even more popular with anyone working with Python. You will then learn a range of further topics including advanced query operations, monitoring and backup using MMS, as well as some very useful administration recipes including SCRAM-SHA-1 Authentication. Beyond that, you will also find recipes on cloud deployment, including guidance on how to work with Docker containers alongside MongoDB, integrating the database with Hadoop, and tips for improving developer productivity.
Created as both an accessible tutorial and an easy to use resource, on hand whenever you need to solve a problem, MongoDB Cookbook will help you handle everything from administration to automation with MongoDB more effectively than ever before.
Style and approach
Every recipe is explained in a very simple set-by-step manner yet is extremely comprehensive.
Author(s): Cyrus Dasadia, Amol Nayak
10. Web Development with MongoDB and NodeJS (2015)
Build an interactive and full-featured web application from scratch using Node.js and MongoDB
About This Book
- Configure your development environment to use Node.js and MongoDB
- Use Node.js to connect to a MongoDB database and perform data manipulations
- A practical guide with clear instructions to design and develop a complete web application from start to finish
Who This Book Is For
What You Will Learn
- Configure your development environment to use Node.js and MongoDB
- Write and configure a web server using Node.js powered by the Express.js framework
- Build dynamic HTML pages using the Handlebars template engine
- Persist application data using MongoDB and Mongoose ODM
- Test your code using automated testing tools such as the Mocha framework
- Deploy the development environment to the cloud using services such as Heroku, Amazon Web Services, and Microsoft Azure
- Explore Single-Page application frameworks to take your web applications to the next level
Node.js and MongoDB are quickly becoming one of the most popular tech stacks for the web. Powered by Google’s V8 engine, Node.js caters to easily building fast, scalable network applications while MongoDB is the perfect fit as a scalable, high-performance, open source NoSQL database solution. Using these two technologies together, web applications can be built quickly and easily and deployed to the cloud with very little difficulty.
The book will begin by introducing you to the groundwork needed to set up the development environment. Here, you will quickly run through the steps necessary to get the main application server up and running. Then you will see how to use Node.js to connect to a MongoDB database and perform data manipulations.
From here on, the book will take you through integration with third-party tools for interaction with web apps. It then moves on to show you how to use controllers and view models to generate reusable code that will reduce development time. Toward the end of the book, we will cover tests to properly execute the code and some popular frameworks for developing web applications.
By the end of the book, you will have a running web application developed with MongoDB and Node.js along with it’s popular frameworks.
Style and approach
An easy guide to Node.js and MongoDB, which will quickly introduce you to the relevant concepts by taking you through the different steps involved in building a full-fledged web application.
Author(s): Mithun Satheesh, Bruno Joseph D’mello
11. MongoDB Administrator’s Guide (2017)
- Configure and deploy your MongoDB instance securely, without any hassle
- Optimize your database’s query performance, perform scale-out operations, and make your database highly available
- Practical guide with a recipe-based approach to help you tackle any problem in the application and database administration aspects of MongoDB
MongoDB is a high-performance and feature-rich NoSQL database that forms the backbone of the systems that power many different organizations. Packed with many features that have become essential for many different types of software professional and incredibly easy to use, this cookbook contains more than 100 recipes to address the everyday challenges of working with MongoDB.
Starting with database configuration, you will understand the indexing aspects of MongoDB. The book also includes practical recipes on how you can optimize your database query performance, perform diagnostics, and query debugging. You will also learn how to implement the core administration tasks required for high-availability and scalability, achieved through replica sets and sharding, respectively. You will also implement server security concepts such as authentication, user management, role-based access models, and TLS configuration. You will also learn how to back up and recover your database efficiently and monitor server performance.
By the end of this book, you will have all the information you need—along with tips, tricks, and best practices—to implement a high-performance MongoDB solution.
What you will learn
- Install and deploy MongoDB in production
- Manage and implement optimal indexes
- Optimize monitoring in MongoDB
- Fine-tune the performance of your queries
- Debug and diagnose your database’s performance
- Optimize database backups and recovery and ensure high availability
- Make your MongoDB instance scalable
- Implement security and user authentication features in MongoDB
- Master optimal cloud deployment strategies
About the Author
Cyrus Dasadia has enjoyed tinkering with open source projects since 1996. He has been working as a Linux system administrator and part-time programmer for over a decade. He works at InMobi, where he loves designing tools and platforms. His love for MongoDB blossomed in 2013, when he was amazed by its ease of use and stability. Since then, almost all of his projects have been written with MongoDB as the primary backend. Cyrus is also the creator of an open source alert management system called CitoEngine. His spare time is devoted to trying to reverse-engineer software, playing computer games, or increasing his silliness quotient by watching reruns of Monty Python.
Table of Contents
- Installation and Configuration
- Understanding and Managing Indexes
- Performance Tuning
- High Availability with Replication
- High Scalability with Sharding
- Managing MongoDB backups
- Restoring MongoDB from backups
- Monitoring MongoDB
- Authentication and Security in MongoDB
- Deploying MongoDB in Production
Author(s): Cyrus Dasadia