Thursday, 28 November 2013

MongoDB Introduction



  •  MongoDB is an open-source document database, and leading NoSQL database. MongoDB is written in      c++.
  • MongoDB is a cross-platform, document oriented database that provides, high performance, high  availability, and easy scalability. MongoDB works on concept of collection and document.
  • Below given table shows the relationship of RDBMS terminology with MongoDB



RDBMSMongoDB
DatabaseDatabase
TableCollection
Tuple/RowDocument
columnField
Table JoinEmbedded Documents
Primary KeyPrimary Key (Default key _id provided by mongodb itself)
Database Server and Client
Mysqld/Oraclemongod
mysql/sqlplusmongo


  • Any relational database has a typical schema design that shows number of tables and the relationship between these tables. While in MongoDB there is no concept of relationship


Advantages of MongoDB over RDBMS


  • Schema less : MongoDB is document database in which one collection holds different different documents. Number of fields, content and size of the document can be differ from one document to another.
  • Structure of a single object is clear
  • No complex joins
  • Deep query-ability. MongoDB supports dynamic queries on documents using a document-based query language that's nearly as powerful as SQL
  • Tuning
  • Ease of scale-out: MongoDB is easy to scale
  • Conversion / mapping of application objects to database objects not needed
  • Uses internal memory for storing the (windowed) working set, enabling faster access of data


Why should use MongoDB


  • Document Oriented Storage : Data is stored in the form of JSON style documents
  • Index on any attribute
  • Replication & High Availability
  • Auto-Sharding
  • Rich Queries
  • Fast In-Place Updates
  • Professional Support By MongoDB


Where should use MongoDB?


  • Big Data
  • Content Management and Delivery
  • Mobile and Social Infrastructure
  • User Data Management
  • Data Hub



DBT - Models

Models are where your developers spend most of their time within a dbt environment. Models are primarily written as a select statement and ...