Subhashini Chellappan and Dharanitharan Ganesan

MongoDB Recipes

With Data Modeling and Query Building Strategies

Subhashini Chellappan
Bangalore, India
Dharanitharan Ganesan
Krishnagiri, Tamil Nadu, India
ISBN 978-1-4842-4890-4e-ISBN 978-1-4842-4891-1
© Subhashini Chellappan and Dharanitharan Ganesan 2020
Apress Standard
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Introduction

Why This Book?

MongoDB is an open source, document-oriented NoSQL database written in C++. MongoDB provides high availability, automatic scaling, and high performance. The book has the following within its scope:
  • Introduction to NoSQL databases, features of MongoDB, and installation procedures

  • Complete CRUD operations and MongoDB query language examples

  • Demonstrations of the aggregation framework to group data and perform aggregation operations

  • Indexing details to improve the performance of a query

  • Replication and sharding features to increase data availability and avoid data loss in case of a failure

  • Monitoring the database and backup strategies

  • Security features to implement proper authentication and authorization

Who Is This Book For?

The audience for this book includes all levels of IT professionals and anyone who wants to get a good understanding of MongoDB.

How Is This Book Organized?

Chapter 1 describes NoSQL databases, various features of MongoDB, the installation procedure, and how to interact with MongoDB.

Chapter 2 describes MongoDB’s rich query language to support create, read, update, and delete (CRUD) operations.

Chapter 3 describes the aggregation framework to perform aggregation operations. The aggregation framework can group data and perform a variety of operations on that grouped data.

Chapter 4 describes indexes, types of index, index properties, and the various indexing strategies to be considered. Indexes are used to improve the performance of a query.

Chapter 5 describes the various replication and sharding strategies in MongoDB. Replication is the process of creating and managing a duplicate version of a database across servers to provide redundancy and increase the availability of data. Sharding distributes data across servers to increase availability.

Chapter 6 describes the multi-document transactions feature. Multi-document transactions help us to achieve all-or-nothing execution to maintain data integrity.

Chapter 7 describes the details of various tools to monitor a MongoDB database and procedures for backup operations. These MongoDB monitoring tools help us to understand what is happening with a database at various levels.

Chapter 8 describes the various security features in MongoDB to verify the identity of the user and access controls to determine the verified user’s access to resources and operations.

How Can I Get the Most Out of This Book?

It is easy to leverage this book for maximum gain by reading the chapters thoroughly. Get hands-on by following the step-by-step instructions provided in the recipes. Do not skip any of the demonstrations. If need be, repeat them a second time or until the concept is firmly etched in your mind. Happy learning!

Subhashini Chellappan

Dharanitharan Ganesan

Acknowledgments

The making of this book was a journey that we are glad we undertook. The journey spanned a few months, but the experience will last a lifetime. We had our families, friends, colleagues, and other well-wishers onboard for this journey and we wish to express our deepest gratitude to each one of them.

We would like to express our special thanks to our families, friends, and colleagues who provided the support that allowed us to complete this book within a limited time frame.

Special thanks are extended to our technical reviewers for the vigilant review and filling in with their expert opinion.

We would like to thank Celestin Suresh John at Apress for signing us up for this wonderful creation. We wish to acknowledge and appreciate all our coordinating editors and the team who guided us through the entire process of preparation and publication.

Table of Contents

Index 243

About the Authors and About the Technical Reviewer

About the Authors

Subhashini Chellappan
../images/475461_1_En_BookFrontmatter_Figb_HTML.jpg

is a technology enthusiast with expertise in the big data and cloud space. She has rich experience in both academia and the software industry. Her areas of interest and expertise are centered on business intelligence, big data analytics, and cloud computing.

 
Dharanitharan Ganesan
../images/475461_1_En_BookFrontmatter_Figc_HTML.jpg

has an MBA in technology management with high level of exposure and experience in big data—Apache Hadoop, Apache Spark, and various Hadoop ecosystem components. He has a proven track record of improving efficiency and productivity through the automation of various routine and administrative functions in business intelligence and big data technologies. His areas of interest and expertise are centered on machine learning algorithms, blockchain in big data, statistical modeling, and predictive analytics.

 

About the Technical Reviewer

Manoj Patil
../images/475461_1_En_BookFrontmatter_Figd_HTML.jpg

has been working in the software industry for nearly 20 years. He holds an engineering degree from COEP, Pune (India) and since then has enjoyed an exciting IT journey.

As a Principal Architect at TatvaSoft, Manoj has undertaken many initiatives in the organization ranging from training and mentoring teams leading the data science and machine learning practice, to successfully designing client solutions from different functional domains.

Starting as a Java programmer, he is one of the fortunate to have worked on multiple frameworks with multiple languages as a full-stack developer. In last five years, he has worked extensively in the field of business intelligence, big data, and machine learning with the technologies like Hitachi Vantara (Pentaho), Hadoop ecosystem, tensorflow, Python-based libraries, and more.

He is passionate about learning new technologies, trends, and reviewing books. When he is not working, he is either working out or reading infinitheism literature.

Manoj would like to thank Apress for providing this opportunity to review this title and his two daughters Ayushee and Ananyaa for their understanding during the process.

 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset