Zum Hauptinhalt springen
Nicht aus der Schweiz? Besuchen Sie lehmanns.de

Official MongoDB Guide (eBook)

Resilience, scalability, security and performance
eBook Download: EPUB
2025 | 1. Auflage
368 Seiten
Packt Publishing (Verlag)
978-1-83702-196-3 (ISBN)

Lese- und Medienproben

Official MongoDB Guide -  Jeffrey Allen,  Parker Faucher,  Alison Huh,  Lander Kerbey,  Rachelle Palmer,  Maya Raman,  Lauren Tran
Systemvoraussetzungen
29,99 inkl. MwSt
(CHF 29,30)
Der eBook-Verkauf erfolgt durch die Lehmanns Media GmbH (Berlin) zum Preis in Euro inkl. MwSt.
  • Download sofort lieferbar
  • Zahlungsarten anzeigen

Delivering secure, scalable, and high-performance applications is never easy, especially when systems must handle growth, protect sensitive data, and perform reliably under pressure. The Official MongoDB Guide addresses these challenges with guidance from MongoDB's top subject matter experts, so you learn proven best practices directly from those who know the technology inside out.
This book takes you from core concepts and architecture through to advanced techniques for data modeling, indexing, and query optimization, supported by real-world patterns that improve performance and resilience. It offers practical coverage of developer tooling, IDE integrations, and AI-assisted workflows that will help you work faster and more effectively.
Security-focused chapters walk you through authentication, authorization, encryption, and compliance, while chapters dedicated to MongoDB Atlas showcase its robust security features and demonstrate how to deploy, scale, and leverage platform-native capabilities such as Atlas Search and Atlas Vector Search.
By the end of this book, you'll be able to design, build, and manage MongoDB applications with the confidence that comes from learning directly from the experts shaping the technology.


The official guide to MongoDB architecture, tools, and cloud features, written by leading MongoDB subject matter experts to help you build secure, scalable, high-performance applicationsKey FeaturesDesign resilient, secure solutions with high performance and scalabilityStreamline development with modern tooling, indexing, and AI-powered workflowsDeploy and optimize in the cloud using advanced MongoDB Atlas featuresPurchase of the print or Kindle book includes a free PDF eBookBook DescriptionDelivering secure, scalable, and high-performance applications is never easy, especially when systems must handle growth, protect sensitive data, and perform reliably under pressure. The Official MongoDB Guide addresses these challenges with guidance from MongoDB's top subject matter experts, so you learn proven best practices directly from those who know the technology inside out. This book takes you from core concepts and architecture through to advanced techniques for data modeling, indexing, and query optimization, supported by real-world patterns that improve performance and resilience. It offers practical coverage of developer tooling, IDE integrations, and AI-assisted workflows that will help you work faster and more effectively. Security-focused chapters walk you through authentication, authorization, encryption, and compliance, while chapters dedicated to MongoDB Atlas showcase its robust security features and demonstrate how to deploy, scale, and leverage platform-native capabilities such as Atlas Search and Atlas Vector Search. By the end of this book, you ll be able to design, build, and manage MongoDB applications with the confidence that comes from learning directly from the experts shaping the technology.What you will learnBuild secure, scalable, and high-performance applicationsDesign efficient data models and indexes for real workloadsWrite powerful queries to sort, filter, and project dataProtect applications with authentication and encryptionAccelerate coding with AI-powered and IDE-based toolsLaunch, scale, and manage MongoDB Atlas with confidenceUnlock advanced features like Atlas Search and Atlas Vector SearchApply proven techniques from MongoDB's own engineering leadersWho this book is forThis book is for developers, database professionals, architects, and platform teams who want to get the most out of MongoDB. Whether you re building web apps, APIs, mobile services, or backend systems, the concepts covered here will help you structure data, improve performance, and deliver value to your users. No prior experience with MongoDB is required, but familiarity with databases and programming will be helpful.]]>

1


Introduction to MongoDB


MongoDB is the world’s most popular NoSQL document database. Rather than using traditional relational tables, it stores data in a flexible, JSON-like format. Developers value it for its ease of scaling, strong security features, and reliable performance. With tools such as AI-enhanced search, sharding, and encryption, MongoDB offers a comprehensive platform for handling diverse data needs.

MongoDB 8.0 is the fastest and highest-performing version of MongoDB yet, performing around 32% faster than the previous version of MongoDB (Source: https://www.mongodb.com/company/blog/mongodb-8-0-improving-performance-avoiding-regressions). In addition to performance gains, MongoDB 8.0 delivers various improvements in aggregation, security, sharding, replication, and more, such as the following:

  • Sharding enhancements distribute data across shards up to 50 times faster and at up to 50% lower starting cost, lowering the infrastructure cost of getting started by up to $5,000 (USD) per year
  • Improved support for a wide range of search and AI applications at higher scale and lower cost, using quantized vectors (compressed representations of full-fidelity vectors) that require up to 96% less memory and are faster to retrieve while preserving accuracy
  • Expanded support for MongoDB’s Queryable Encryption, a groundbreaking innovation developed by the MongoDB Cryptography Research Group, to also support range queries

This book provides a comprehensive overview of what MongoDB, particularly version 8.0, can offer for your development needs. While we strive to be comprehensive and current, MongoDB is constantly adding new features. For the most detailed and up-to-date information, check out the MongoDB documentation at https://mongodb.com/docs.

In this chapter, we’re going to cover the following topics:

  • Why MongoDB?
  • Who uses MongoDB?
  • MongoDB architecture
  • What’s new in MongoDB 8.0?

Why MongoDB?


MongoDB is the preferred developer data platform for several reasons:

  • Flexibility: MongoDB lets you work with data without locking you into rigid schemas. This makes it easier to adapt your application as your data changes, or when handling formats that benefit from a flexible data store, such as unstructured or semi-structured content.
  • Scalability and performance: MongoDB is highly scalable and performant, allowing it to support both large-scale applications and smaller individual projects.
  • Security: MongoDB offers various security methods from user authentication and authorization to data and network encryption, including 8.0 support for OIDC authentication and authorization, and range queries in Queryable Encryption.
  • Query language: MongoDB offers a powerful query language that you can use to access your data, simplifying common operations such as findOne and updateOne. It also offers indexing capabilities for increased query efficiency.
  • Developer-friendly data format: MongoDB stores data in a document format that resembles the structure of objects in many widely used programming languages, which helps simplify data handling and speeds up the development process.
  • Quick start: MongoDB’s simplicity and user-friendly setup make it easy to start using.

Plainly, MongoDB is simple to use. You can interact with your deployment in various ways, such as through programming language drivers, methods in the MongoDB Shell, and database commands. MongoDB provides a simple and streamlined interface for creating, updating, and interacting with data. For example, consider a Python developer attempting to insert a document by using the Python driver:

from pymongo import MongoClient # Connect to MongoDB client = MongoClient('mongodb://localhost:27017/') db = client['mydatabase'] # Specify the database name collection = db['mycollection'] # Specify the collection name # Create a document to be inserted document = { 'name': 'Chinazom', 'email': 'chinazom@example.com' } # Insert the document into the collection result = collection.insert_one(document) # Check if the insertion was successful if result.acknowledged: print('Document inserted successfully.') print('Inserted document ID:', result.inserted_id) else: print('Failed to insert document.')

Easy! You don’t need to create an ID for the document, because MongoDB automatically creates one for you. In this case, all the developer needs to define are the document’s name, age, and email details.

Now, suppose the developer wants to retrieve this document by using a query. You can query for equality (for example, searching for documents in which the name is Chinazom). You can also query for inequality. In the following example, we are constructing a query to look for documents whose age is less than or equal to 25.

from pymongo import MongoClient # Connect to MongoDB client = MongoClient('mongodb://localhost:27017/') db = client['mydatabase'] # Specify the database name collection = db['mycollection'] # Specify the collection name # Retrieve documents based on specific conditions query = { 'age': {'$lte': 25}, # Retrieve documents where age is less than or equal to 25 } documents = collection.find(query) # Iterate over the retrieved documents for document in documents: print(document)

This example shows how you can use a MongoDB query operator such as $lte to filter a query. MongoDB returns a document that is represented as a Python dictionary, where each field is a key-value pair in the dictionary. See the following example:

{ '_id': ObjectId('60f5c4c4543b5a2c7c4c73a2'), 'name': 'Chinazom', 'age': 24, 'email': 'chinazom@example.com' }

As you can see, the _id field has been inserted by MongoDB and is represented as an ObjectId data type. The _id field is a unique and fast-to-generate identifier for each document. It is used as a document’s primary identifier.

MongoDB has a suite of drivers in various programming languages that act as a translation layer between the client and server. By using these drivers, you can interact with the data with your native programming language. You can also interact with your data by using the MongoDB Shell, database commands, and other tools offered by MongoDB.

The mission of MongoDB is to be a powerful database for developers, and its features are developed with programming language communities and framework integrations in mind. This will become more apparent in subsequent chapters, where you’ll learn about CRUD operations, sharding, replication, MongoDB Atlas, and more, all through the lens of a developer.

Who uses MongoDB?


MongoDB is used by many different industries, and its use cases span all kinds of situations and types of data. Users range from small businesses and start-ups, and even student projects, to some of the largest banks, automakers, and government agencies in the world.

MongoDB offers three different environments for you to create a database and store your data, each of which supports different developer needs:

  • MongoDB Atlas: Atlas is MongoDB’s cloud database service. It simplifies deploying and managing your databases, removing the user’s responsibility to maintain hardware and keep up with software patches. You can provision your database through the Atlas UI and easily scale as necessary. When you use Atlas, you have access to additional features such as embedded full-text search via Atlas Search, vector-based search through Atlas Vector Search, and Atlas Stream Processing, which allows you to process streams of complex data. Atlas is used by those who want to focus on developing data models instead of spending resources provisioning and managing their database.
  • MongoDB Enterprise Advanced (EA): MongoDB EA is the commercial edition of MongoDB. It includes additional capabilities such as an in-memory storage engine for high throughput and low latency, advanced security features such as Kerberos access controls, and encryption for data at rest. EA is ideal for organizations that require self-managed deployments on-premises, in private clouds, or in hybrid environments. The EA subscription, through which you get MongoDB EA, includes 24/7/365 support and tools such as MongoDB Ops Manager to help simplify deployment.
  • MongoDB Community: MongoDB Community is the free-to-use version of MongoDB. It includes support for basic operations such as queries, indexing, and aggregation. Because it is free and source-available, MongoDB Community is often used by small businesses and...

Erscheint lt. Verlag 5.9.2025
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Datenbanken
Mathematik / Informatik Informatik Theorie / Studium
ISBN-10 1-83702-196-1 / 1837021961
ISBN-13 978-1-83702-196-3 / 9781837021963
Informationen gemäß Produktsicherheitsverordnung (GPSR)
Haben Sie eine Frage zum Produkt?
EPUBEPUB (Ohne DRM)

Digital Rights Management: ohne DRM
Dieses eBook enthält kein DRM oder Kopier­schutz. Eine Weiter­gabe an Dritte ist jedoch rechtlich nicht zulässig, weil Sie beim Kauf nur die Rechte an der persön­lichen Nutzung erwerben.

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür die kostenlose Software Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Der Leitfaden für die Praxis

von Christiana Klingenberg; Kristin Weber

eBook Download (2025)
Carl Hanser Fachbuchverlag
CHF 48,80