Databases Reference
In-Depth Information
Stored JavaScript
Instead of stored procedures, developers can store and use JavaScript functions
and values on the server side.
Aggregation
MongoDB supports MapReduce and other aggregation tools.
Fixed-size collections
Capped collections are fixed in size and are useful for certain types of data, such
as logs.
File storage
MongoDB supports an easy-to-use protocol for storing large files and file metadata.
Some features common to relational databases are not present in MongoDB, notably
joins and complex multirow transactions. These are architectural decisions to allow
for scalability, because both of those features are difficult to provide efficiently in a
distributed system.
…Without Sacrificing Speed
Incredible performance is a major goal for MongoDB and has shaped many design
decisions. MongoDB uses a binary wire protocol as the primary mode of interaction
with the server (as opposed to a protocol with more overhead, like HTTP/REST). It
adds dynamic padding to documents and preallocates data files to trade extra space
usage for consistent performance. It uses memory-mapped files in the default storage
engine, which pushes the responsibility for memory management to the operating sys-
tem. It also features a dynamic query optimizer that “remembers” the fastest way to
perform a query. In short, almost every aspect of MongoDB was designed to maintain
high performance.
Although MongoDB is powerful and attempts to keep many features from relational
systems, it is not intended to do everything that a relational database does. Whenever
possible, the database server offloads processing and logic to the client side (handled
either by the drivers or by a user's application code). Maintaining this streamlined
design is one of the reasons MongoDB can achieve such high performance.
Simple Administration
MongoDB tries to simplify database administration by making servers administrate
themselves as much as possible. Aside from starting the database server, very little
administration is necessary. If a master server goes down, MongoDB can automatically
failover to a backup slave and promote the slave to a master. In a distributed environ-
ment, the cluster needs to be told only that a new node exists to automatically integrate
and configure it.
 
Search WWH ::




Custom Search