Mongo DB – A Beginner’s Intro

Mongo DB – A Beginner’s Intro
MongoDB is an open source, schema-less database which is entirely different from the traditional SQL databases. It is a document-oriented database that aims to provides high performance, availability and scalability.

The one major difference is that it follows a NoSQL database schema, meaning that there are no more of Joins, Transactions etc.
MongoDB in turn uses a BSON(Binary JSON) style formats for data manipulations.

More technical?

  • Document Database 
    • Mapping objects to data types in programming languages.
    • Use of embedded documents and arrays.
    • Dynamic schema helps for Real-time implementation.
  • High Performance
    • Embedding makes reads and writes fast, optional streaming writes.
    • Keys from embedded documents and arrays are used for indexes.
  • High Availability
    • Server replication.
  • Easy Scalability
    • Automatic sharding distributes collection data across machines.
    • Eventually-consistent reads can be distributed over replicated servers.
  • Advanced Operations
Do you need more reasons to opt for MongoDB?
  • Schema-less database makes life simpler
  • Supports Windows, Linux and even OSX
  • Very active development team
  • Availability of various libraries, such as one for iPhone developers
  • Wide variety of language support,  C/C++, Python, PHP, Ruby, Perl, .NET, even Node.js

MongoDB supports a “standalone” or single-instance operation. It also works in distributed environments, with is quite common. MongoDB users combine replica sets and sharded clusters to provide high levels redundancy for large data sets transparently for applications.

MongoDB is a server process that runs on Windows, Linux and OS X. It can be run both as a 32 or 64-bit application. We recommend running in 64-bit mode, since 32-bit mode limits databases to a total data size of about 2GB.
1. Collections

A collection, equivalent to tables, may be considered as a table except there are no aligned columns.

2.Data types
MongoDB supports a huge collection of data types from various programming languages.

  • Float
  • Double
  • Integer
  • Long
  • Date
  • RegExp
  • String
  • Binary
  • Code
  • ObjectID
  • DbRef
  • Symbol
This is how a BSON looks:

Stay tuned for more on MongoDB installation, execution of commands and retrieval of datasets.