MongoDB Fundamentals
eBook - ePub

MongoDB Fundamentals

A hands-on guide to using MongoDB and Atlas in the real world

Amit Phaltankar, Juned Ahsan, Michael Harrison, Liviu Nedov

  1. 748 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

MongoDB Fundamentals

A hands-on guide to using MongoDB and Atlas in the real world

Amit Phaltankar, Juned Ahsan, Michael Harrison, Liviu Nedov

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Learn how to deploy and monitor databases in the cloud, manipulate documents, visualize data, and build applications running on MongoDB using Node.js

Key Features

  • Learn the fundamentals of NoSQL databases with MongoDB
  • Create, manage, and optimize a MongoDB database in the cloud using Atlas
  • Use a real-world dataset to gain practical experience of handling big data

Book Description

MongoDB is one of the most popular database technologies for handling large collections of data. This book will help MongoDB beginners develop the knowledge and skills to create databases and process data efficiently.

Unlike other MongoDB books, MongoDB Fundamentals dives into cloud computing from the very start – showing you how to get started with Atlas in the first chapter. You will discover how to modify existing data, add new data into a database, and handle complex queries by creating aggregation pipelines. As you progress, you'll learn about the MongoDB replication architecture and configure a simple cluster. Youwill also get to grips with user authentication, as well as techniques for backing up and restoring data. Finally, you'll perform data visualization using MongoDBCharts.

You will work on realistic projects that are presented as bitesize exercises and activities, allowing you to challenge yourself in an enjoyable and attainable way. Manyof these mini-projects are based around a movie database case study, while the last chapter acts as a final project where you will use MongoDB to solve a real-world problem based on a bike-sharing app.

By the end of this book, you'll have the skills and confidence to process large volumes of data and tackle your own projects using MongoDB.

What you will learn

  • Set up and use MongoDB Atlas on the cloud
  • Insert, update, delete, and retrieve data from MongoDB
  • Build aggregation pipelines to perform complex queries
  • Optimize queries using indexes
  • Monitor databases and manage user authorization
  • Improve scalability and performance with sharding clusters
  • Replicate clusters, back up your database, and restore data
  • Create data-driven charts and reports from real-time data

Who this book is for

This book is designed for people who are new to MongoDB. It is suitable for developers, database administrators, system administrators, and cloud architects who are looking to use MongoDB for smooth data processing in the cloud. Although not necessary, basic knowledge of a general programming language and experience with other databases will help you grasp the topics covered more easily.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
MongoDB Fundamentals è disponibile online in formato PDF/ePub?
Sì, puoi accedere a MongoDB Fundamentals di Amit Phaltankar, Juned Ahsan, Michael Harrison, Liviu Nedov in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatica e Database. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2020
ISBN
9781839213045
Edizione
1
Argomento
Informatica
Categoria
Database

1. Introduction to MongoDB

Overview
This chapter will introduce you to MongoDB fundamentals, first defining data and its types, then exploring how a database solves data storage challenges. You will learn about the different types of databases and how to select the right one for your task. Once you have a clear idea about these concepts, we will discuss MongoDB, its features, architecture, licensing, and deployment models. By the end of the chapter, you will have gained hands-on experience using MongoDB through Atlas—the cloud-based service used to manage MongoDB—and worked with its basic elements, such as databases, collections, and documents.

Introduction

A database is a platform to store data in a way that is secure, reliable, and easily available. There are two types of databases used in general: relational databases and non-relational databases. Non-relational databases are often called as NoSQL databases. A NoSQL database is used to store large quantities of complex and diverse data, such as product catalogs, logs, user interactions, analytics, and more. MongoDB is one of the most established NoSQL databases, with features such as data aggregation, ACID (Atomicity, Consistency, Isolation, Durability) transactions, horizontal scaling, and Charts, all of which we will explore in detail in the upcoming sections.
Data is crucial for businesses—specifically, storing, analyzing, and visualizing the data while making data-driven decisions. It is for this reason that MongoDB is trusted and used by companies such as Google, Facebook, Adobe, Cisco, eBay, SAP, EA, and many more.
MongoDB comes in different variants and can be utilized for both experimental and real-world applications. It is easier to set up and simpler to manage than most other databases due to its intuitive syntax for queries and commands. MongoDB is available for anyone to install on their own machine(s) or to be used on the cloud as a managed service. MongoDB's cloud-managed service (called Atlas) is available to everyone for free, whether you are an established enterprise or a student. Before we start our discussion of MongoDB, let us first learn about database management systems.

Database Management Systems

A Database Management System (DBMS) provides the ability to store and retrieve data. It uses query languages to create, update, delete, and retrieve data. Let us look at the different types of DBMS.

Relational Database Management Systems

Relational Database Management Systems (RDBMS) are used to store structured data. The data is stored in the form of tables that consist of rows and columns. The tables can have relationships with other tables to depict the actual data relationships. For example, in a university relational database, the Student table can be related to the Course and Marks Obtained tables through a common columns such as courseId.

NoSQL Database Management Systems

NoSQL databases were invented to solve the problem of storing unstructured and semi-structured data. Relational databases enforce the structure of data to be defined before the data can be stored. This database structure definition is often referred to as schema, which pertains to the data entities, that is, its attributes and types. RDBMS client applications are tightly coupled with the schema. It is hard to modify the schema without affecting the clients. Contrastingly, NoSQL databases allow you to store the data without a schema and also support dynamic schema, which decouples the clients from a rigid schema, and is often necessary for modern and experimental applications.
The data stored in the NoSQL database varies depending on the provider, but generally, data is stored as documents instead of tables. An example of this would be databases for inventory management, where different products can have different attributes and, therefore, require a flexible structure. Similarly, an analytics database that stores data from different sources in different structures would also need a flexible structure.

Comparison

Let us compare NoSQL databases and RDBMS based on the following factors. You will get an in-depth understanding of these as you read through this book. For now, a basic overview is provided in the following table:
Figure 1.1: Differences between relational databases and NoSQL
Figure 1.1: Differences between relational databases and NoSQL
That concludes our discussion on databases and the differences between the various database types. In the next section, we will begin our exploration of MongoDB.

Introduction to MongoDB

MongoDB is a popular NoSQL database that can store both structured and unstructured data. Founded in 2007 by Kevin P. Ryan, Dwight Merriman, and Eliot Horowitz in New York, the organization was initially called 10gen and was later renamed MongoDB—a word inspired by the term humongous.
It provides both essential and extravagant features that are needed to store real-world big data. Its document-based design makes it easy to understand and use. It is built to be utilized for both experimental and real-world applications and is easier to set up and simpler to manage than most of the other NoSQL databases. Its intuitive syntax for queries and commands makes it easy to learn.
The following list explores these features in detail:
  • Flexible and Dynamic Schema: MongoDB allows a flexible schema for your database. A flexible schema allows variance in fields in different documents. In simple terms, each record in the database may or may not have the same number of attributes. It addresses the need for storing evolving data without making any changes to the schema itself.
  • Rich Query Lang...

Indice dei contenuti

  1. MongoDB Fundamentals
  2. Preface
  3. 1. Introduction to MongoDB
  4. 2. Documents and Data Types
  5. 3. Servers and Clients
  6. 4. Querying Documents
  7. 5. Inserting, Updating, and Deleting Documents
  8. 6. Updating with Aggregation Pipelines and Arrays
  9. 7. Data Aggregation
  10. 8. Coding JavaScript in MongoDB
  11. 9. Performance
  12. 10. Replication
  13. 11. Backup and Restore in MongoDB
  14. 12. Data Visualization
  15. 13. MongoDB Case Study
  16. Appendix
Stili delle citazioni per MongoDB Fundamentals

APA 6 Citation

Phaltankar, A., Ahsan, J., Harrison, M., & Nedov, L. (2020). MongoDB Fundamentals (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/2059687/mongodb-fundamentals-a-handson-guide-to-using-mongodb-and-atlas-in-the-real-world-pdf (Original work published 2020)

Chicago Citation

Phaltankar, Amit, Juned Ahsan, Michael Harrison, and Liviu Nedov. (2020) 2020. MongoDB Fundamentals. 1st ed. Packt Publishing. https://www.perlego.com/book/2059687/mongodb-fundamentals-a-handson-guide-to-using-mongodb-and-atlas-in-the-real-world-pdf.

Harvard Citation

Phaltankar, A. et al. (2020) MongoDB Fundamentals. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/2059687/mongodb-fundamentals-a-handson-guide-to-using-mongodb-and-atlas-in-the-real-world-pdf (Accessed: 15 October 2022).

MLA 7 Citation

Phaltankar, Amit et al. MongoDB Fundamentals. 1st ed. Packt Publishing, 2020. Web. 15 Oct. 2022.