Building blocks of MongoDB databases

The ABC's of MongoDB

MongoDB is on our list of Top Ten resources! MongoDB is a scalable, NOSQL, open source, document-oriented database, specifically designed with the agility of the developer and scalability in mind. Stephen Pope, Project Ricochet founding Partner and Sr. Software Engineer (@stephengpope), reports that Ricochet developers are saving a significant amount of database administration time, which translates to our clients saving their development dollars. (And that’s always good!)

With MongoDB, you’ll store your information by utilizing dynamic schemas in JSON documents—this allows for limitless schemas, making developing certain types of apps both easier and faster.

Take a minute to brush up on your MongoDB vocabulary here, then head over to Mongo DB for more info.

aggregation

Any of a variety of operations that reduces and summarizes large sets of data like MongoDB’s aggregate() and mapReduce()

balancer

An internal MongoDB process that runs in the context of a shared cluster and manages the migration of chunks.

chunk

A contiguous range of shard key values within a particular shard. Chunk ranges are inclusive of the lower boundary and exclusive of the upper boundary. MongoDB splits chunks when they grow beyond the configured chunk size, which by default is 64 megabytes. MongoDB migrates chunks when a shard contains too many chunks of a collection relative to other shards.

delayed member

A replica set member that cannot become primary and applies operations at a specified delay. The delay is useful for protecting data from human error (i.e. unintentionally deleted databases) or updates that have unforeseen effects on the production database.

eventual consistency

A property of a distributed system that allows changes to the system to propagate gradually. In a database system, this means that readable members are not required to reflect the latest writes at all times.

fsync

A system call that flushes all dirty, in-memory pages to disk. MongoDB calls fsync() on its database files at least every 60 seconds.

GeoJSON

A geospatial data interchange format based on JavaScript Object Notation (JSON). GeoJSON is used in geospatial queries.

hashed shard key

A special type of shard key that uses a hash of the value in the shard key field to distribute documents among members of the shared cluster.

intent lock

A lock on a resource that indicates that the holder of the lock will read (intent shared) or write (intent exclusive) the resource using concurrency control at a finer granularity than that of the resource with the intent lock. Intent locks allow concurrent readers and writers of a resource.

JSON

JavaScript Object Notation. A human-readable, plain text format for expressing structured data with support in many programming languages. Certain MongoDB tools render an approximation of MongoDB BSON documents in JSON format.

K-Means

K-Means clustering aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster.

LVM

Logical volume manager. LVM is a program that abstracts disk images from physical devices and provides a number of raw disk manipulation and snapshot capabilities useful for system management.

MongoDB

An open-source document-based database system. “MongoDB” derives from the word “humongous” because of the database’s ability to scale up with ease and hold very large amounts of data. MongoDB stores documents in collections within databases.

natural order

The order in which the database refers to documents on disk. This is the default sort order.

ObjectId

A special 12-byte BSON type that guarantees uniqueness within the collection. The ObjectId is generated based on timestamp, machine ID, process ID, and a process-local incremental counter. MongoDB uses ObjectId values as the default values for _id fields

padding factor

An automatically-calibrated constant used to determine how much extra space MongoDB should allocate per document container on disk. A padding factor of 1 means that MongoDB will allocate only the amount of space needed for the document. A padding factor of 2 means that MongoDB will allocate twice the amount of space required by the document.

query optimizer

A process that generates query plans. For each query, the optimizer generates a plan that matches the query to the index that will return results as efficiently as possible. The optimizer reuses the query plan each time the query runs. If a collection changes significantly, the optimizer creates a new query plan.

RDBMS

Relational Database Management System. A database management system based on the relational model, typically using SQL as the query language.

sharding

A database architecture that partitions data by key ranges and distributes the data among two or more database instances. Sharding enables horizontal scaling.

TSV

A text-based data format consisting of tab-separated values. This format is commonly used to exchange data between relational databases, since the format is well-suited to tabular data. You can import TSV files using mongoimport.

upsert

An option for update operations; e.g. update(), findAndModify(). If set to true, the update operation will either update the document(s) matched by the specified query or if no documents match, insert a new document. The new document will have the fields indicated in the operation.

virtual memory

An application’s working memory, typically residing on both disk and in physical RAM.

WGS84

The default datum MongoDB uses to calculate geometry over an Earth-like sphere. MongoDB uses the WGS84 datum for geospatial queries on GeoJSON objects.

X, OSX

OSX is the operating system that powers every Mac. Built with UNIX it can explore the depth of what hardware is capable of.

zlib

A data compression library that provides higher compression rates at the cost of more CPU, compared to MongoDB’s use of snappy. You can configure WiredTiger to use zlib as its compression library.


MongoDB is a versatile database that lets you efficiently manage a large amount of information in dynamic ways. “MongoDB has allowed us to quickly build great Meteor applications,” says Steve, “by way of its simple-to-use features and schema-less design."


This is a curated list from MongoDB’s glossary, so be sure to head over to Mongo DB to discover more about the incredible capabilities of this NoSQL system.