MongoDB Journaling to handle instance crash

MongoDB,NoSQL Database Articles,Tutorials, Free Interview Q&A,Training
Delivered by FeedBurner

MongoDB journaling mechanism is the write-ahead redo logs written to journal files that can be used to recover the database datafiles after a mongoDB daemon crash. When journaling is enabled, mongodb creates a sub-folder within dbPath folder the default location of storing datafiles.
MongoDB lets journal file grow upto 1GB in size
After hitting this size limit a new journal file is created
Journal directory holds journal files and last-sequence files
Journal files are append only files. Their names start with j._
Using mongod’s storage.smallfile runtime option we can limit size of journal file to 128MB
After a crash mongodb instance does make use of journal files and sequence number files to perform crash recovery

Schema difference NosQL Vs RDBMS

MongoDB,NoSQL Database Articles,Tutorials, Free Interview Q&A,Training
Delivered by FeedBurner

NoSQL the new generation databases are gaining popularity with storing, processing of big data. Traditional information data stores happened to be relational database management systems. Here is a quick overview of difference in schema design between RDBMS and NoSQL databases
1) RDBMS schema design – Fixed schema. Once a table is created with columns containing specified datatype, information needs to be stored in all columns with designated datatype
2) NoSQL schema design – Dynamic schema. There is no need for every field to contain data. Also the type of data stored in a field can vary

MongoDB _id primary key a quick overview

MongoDB,NoSQL Database Articles,Tutorials, Free Interview Q&A,Training
Delivered by FeedBurner

MongoDB the leading NoSQL database does store data in collections which are table equivalents in RDBMS. The row in RDBMS becomes document in mongoDB. Every document in MongoDB is uniquely identified by a primary key which takes the form _id. Lets see some quick voerview of what the _id is , how it is made , meaning of it
1) _id is the primary key in any collection that uniquely identifies a document
2) This can be inserted by user (or) system generated
3) This uniquely identifies a document
4) This is a 12 byte hesadecimal number
5) First 4 bytes represent current timestamp, next 3 bytes represents machine id, next 2 bytes represents mongod server process id, last 3 bytes is generated by system which simply increments the count
6) An unique index is internally created on _id field[column equivalent in RDBMS]

MongoDB,NoSQL Database Articles,Tutorials, Free Interview Q&A,Training

Delivered by FeedBurner