• DOCUMENT STORE INTERNALS

    MongoDB is a document store, where documents are grouped together into collections. Collections can be conceptually thought of as relational tables. However, collections don’t impose the strict schema constraints that relational tables do. Arbitrary documents could be grouped together in a single collection. Documents in a collection should be similar, though, to facilitate effective indexing. Collections can be segregated using namespaces but down in the guts the representation isn’t hierarchical.
    Each document is stored in BSON format. BSON is a binary-encoded representation of a JSON-type document format where the structure is close to a nested set of key/value pairs. BSON is a superset of JSON and supports additional types like regular expression, binary data, and date. Each document has a unique identifi er, which MongoDB can generate, if it is not explicitly specifi ed when the data is inserted into a collection, like when auto-generated object ids. MongoDB drivers and clients serialize and de-serialize to and from BSON as they access BSONencoded data. The MongoDB server, on the other hand, understands the BSON format and doesn’t need the additional overhead of serialization. The binary representations are read in the same format as they are transferred across the wire. This provides a great performance boost. High performance is an important philosophy that pervades much of MongoDB design. One such choice is demonstrated in the use of memory-mapped fi les for storage.

    Source of Information : NoSQL


0 comments:

Leave a Reply