Series : MongoDB for Oracle DBA pt 1: Introduction

If you have worked in any sort of Enterprise big or small, most likely you have worked on a Relational Database Management Systems (RDBMS). They have been around for so long that we have taken the relational databases for granted. Relational in RDBMS stands for the relation which exists in a group of objects contained in a abstraction called Schema. A Schema contains tables of Rows and Columns. This has been the defacto way of storing data for the last 40 years since RDBMS have been around. The big vendors in this market today are Oracle, Microsoft, IBM, Teradata, SAP etc. But with the advent of the Internet, Social media and Web 2.0 companies like Google, Facebook, Twitter, Linkedin etc a new sort of challenge for data arised. Data was no longer a neat structure of rows and columns. The data was now unstructured and being generated in volumes unsuitable to be handled by the old workhorses of traditional enterprise technology. To address these new challenges a new breed of databases had to be designed. NOSQL databases, deriving their name from their USP that normal SQL queries don’t work or aren’t required anymore. These new databases were designed to address the challenges of the new age world. The SQL query engine was replaced by data retrieval and inserting API’s. Big Data, real-time capability and ability to scale-out to tens of thousands of servers across data centers sitting in different continents made it attractive for the HyperScale web companies. One of the leading companies driving this NOSQL revolution has been a database called MongoDB. MongoDB lacks any of the traditional ACID compliance capabilities of an RDBMS, but it makes up for those in terms of massive scale-out capabilities and sharding of data across thousands of nodes. Though MongoDB is not the only NOSQL database in the market; there are many like Cassandra, CouchDB, Redis etc but it is certainly the leading in the white Noise of NOSQL databases. It has even launched an IPO recently . MongoDB is a Key-Value Store unlike a traditional DB storage engine, it is document oriented and stores the data in the form of JSON documents. Tables are called Collections, Rows are called Documents, Columns are called Fields and Primary Key is the unique ID assigned to each Document (Rows). It is a Schemaless database which gives developers a lot of freedom with how they design and evolve their data models. Example of a Key Value pair Document Below is Example from MongoDB’s website The Fields are name,age,status,groups and each has an associated value. Also a unique value (key) is assigned to each document. Look at the below example :

If you see the first line it has a field called _id line , it is a unique hexadecimal value assigned to the document. It globally identifies the document in the entire collection of data. It is similar to a Primary Key in a Relational database. Other features of Mongo DB are