📄️ Intro
MongoDB is a NoSQL database that provides high performance, high availability, and easy scalability. It works on the concept of collections and documents, as opposed to the tables and rows found in relational databases. Below are some key aspects of MongoDB:
📄️ Databases and Collections
Create Database
📄️ Datatypes
MongoDB supports a variety of data types, which allows for the storage of diverse kinds of information. Understanding these data types is crucial for effective schema design and data manipulation. Here's a rundown of the different data types supported by MongoDB:
🗃️ CRUD
8 items
📄️ Schemas
In MongoDB, the concept of a schema is more flexible than in traditional relational databases. Unlike SQL databases, where you must define the structure of the data before inserting it, MongoDB collections do not enforce a fixed schema. This means that documents within a single collection can have different fields, and the data types of these fields can vary across documents.
📄️ Update schemas validation
Updating schema validation rules in MongoDB is a common operation, especially as your application evolves and requires more complex data structures or validation logic. You can update the schema validation rules for an existing collection using the collMod command or its equivalent in various MongoDB drivers.
🗃️ Indexing
9 items
📄️ Capped collections
Capped collections are a special type of MongoDB collection that have a fixed size and support high-throughput operations. They automatically remove the oldest documents to make space for new ones when they reach their maximum size. Capped collections are ideal for use-cases like logging, caching, and real-time analytics where you need a FIFO (First-In, First-Out) data structure.
📄️ Transactions
Transactions in MongoDB allow you to execute multiple read and write operations atomically on one or more documents within a single session. This ensures data consistency and integrity, even in distributed systems. Transactions in MongoDB are similar to transactions in relational databases and offer ACID (Atomicity, Consistency, Isolation, Durability) properties.
📄️ Mongod.conf
The mongod.conf file is the configuration file for the MongoDB Database Server (mongod). It's written in YAML format and provides a way to set various options that control the behavior of mongod. Here's a breakdown of some of the key sections and settings you might find in a typical mongod.conf file:
📄️ Mongoimport
mongoimport is a command-line utility that comes with MongoDB and is used for importing content from a JSON, CSV, or TSV file into a MongoDB database. It's particularly useful for initial data loading or for transferring data between different MongoDB instances.
📄️ Architecture
MongoDB's architecture is designed to be flexible, scalable, and capable of handling a wide variety of data types and workloads. Below are the key components and aspects of MongoDB's architecture:
🗃️ Security
3 items
🗃️ Stitch
3 items