Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
INTRODUCTION TO
Ankit Dhir
CEO and Founder
Habilelabs.io
WHAT IS ?
• Scalable High-Performance Open-source, Document-orientated database.
• Built for Speed - the performance of tr...
OPERATIONAL DATABASE LANDSCAPE
Depth of Functionality
Key / Value
Wide Column MongoDB
RDBMS
ScalabilityandPerformance
WHY WE SHOULD USE MONGODB?
• SQL was invented in the 70’s to store data.
• MongoDB stores documents (or) objects.
• Now-a-...
CONCEPT MAPPING
MongoDB RDBMS
Database Database
Collection Table
Document Record/Row
Field Column
Embedded documents, link...
DATABASE
• Made up of Multiple Collections.
• Created on-the-fly when referenced for the first time.
COLLECTION
• Schema-less, and contains Documents.
• Indexable by one/more keys.
• Created on-the-fly when referenced for t...
DOCUMENT
• Stored in a Collection.
• Can have _id key – works like Primary keys in MySQL.
• Supported Relationships
HOW DOES MONGODB STORE DATA
• Data stored in BSON
• BSON is a binary serialization of JSON-like objects Monday
x16x00x00x0...
FLEXIBLE “SCHEMAS”
• Store and combine data of any structure
• No need of giving sophisticated validation rules
• You can ...
WHAT ARE COMMON USE CASES FOR MONGODB?
• The most common use cases for MongoDB include
• Single View
• Internet of Things
...
Single View Internet of Things Mobile Real-Time Analytics
Catalog Personalization Content Management
MongoDB Use Cases
THE LARGEST ECOSYSTEM
• 10,000,000+
MongoDB Downloads
• 300,000+
Online Education Registrants
• 40,000+
MongoDB Cloud Mana...
WHEN WOULD MYSQL BE A BETTER FIT?
• Applications that require complex, multi-row transactions (e.g., a double-
entry bookk...
SQL DATABASE VS MONGODB
SQL Database NoSQL Database
Relational database Non-relational database
Supports SQL query languag...
UNDERSTANDING THE DOCUMENT
• var doc = {
‘_id’: ‘507f191e810c19729de860ea’,
‘createdBy’: DBRef(‘User’, ‘907f191e710c19729d...
QUERY
• Rich JavaScript based Query syntax
• Allow us to deep, nested queries
• Example
• // find posts which has ‘MongoDB...
SOME COOL FEATURES
• Horizontally Scalable Architectures - no joins + no complex transactions
• Geo-spatial Indexes for Ge...
HOW DO WE USE MONGODB AT HABILELABS
• We use with Nodejs, generally as database of REST API Projects in MEAN stack
• We us...
CONTACT US
• Development Center :
Habilelabs Pvt. Ltd.
4th Floor, I.G.M. Senior Secondary Public School Campus,
Sec-93 Aga...
A Presentation on MongoDB Introduction - Habilelabs
Upcoming SlideShare
Loading in …5
×

A Presentation on MongoDB Introduction - Habilelabs

1,087 views

Published on

It is Scalable High-Performance Open-source, Document-orientated database.
Built for Speed - the performance of traditional key-value stores while maintaining functionality of traditional RDBMS.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

A Presentation on MongoDB Introduction - Habilelabs

  1. 1. INTRODUCTION TO Ankit Dhir CEO and Founder Habilelabs.io
  2. 2. WHAT IS ? • Scalable High-Performance Open-source, Document-orientated database. • Built for Speed - the performance of traditional key-value stores while maintaining functionality of traditional RDBMS • Rich Document based queries for Easy readability. • Full Index Support for High Performance. • Replication and Failover for High Availability. • Auto Shading for Easy Scalability. • Map / Reduce for Aggregation.
  3. 3. OPERATIONAL DATABASE LANDSCAPE Depth of Functionality Key / Value Wide Column MongoDB RDBMS ScalabilityandPerformance
  4. 4. WHY WE SHOULD USE MONGODB? • SQL was invented in the 70’s to store data. • MongoDB stores documents (or) objects. • Now-a-days, everyone works with objects(Python/Ruby/Java/etc.) • And we need Databases to persist our objects. Then why not store objects directly ? • Embedded documents and arrays reduce need for joins. No Joins and No- multi document transactions.
  5. 5. CONCEPT MAPPING MongoDB RDBMS Database Database Collection Table Document Record/Row Field Column Embedded documents, linking Joins
  6. 6. DATABASE • Made up of Multiple Collections. • Created on-the-fly when referenced for the first time.
  7. 7. COLLECTION • Schema-less, and contains Documents. • Indexable by one/more keys. • Created on-the-fly when referenced for the first time.
  8. 8. DOCUMENT • Stored in a Collection. • Can have _id key – works like Primary keys in MySQL. • Supported Relationships
  9. 9. HOW DOES MONGODB STORE DATA • Data stored in BSON • BSON is a binary serialization of JSON-like objects Monday x16x00x00x00 // total document size x02 // 0x02 = type String {"hello": "world"} → hellox00 // field name x06x00x00x00worldx00 // field value x00 // 0x00 = type EOO ('end of object') • http://bsonspec.org
  10. 10. FLEXIBLE “SCHEMAS” • Store and combine data of any structure • No need of giving sophisticated validation rules • You can dynamically modify the schema without downtime • Fast, Iterative Development • You spend less time prepping your data for the database, and more time putting your data to work
  11. 11. WHAT ARE COMMON USE CASES FOR MONGODB? • The most common use cases for MongoDB include • Single View • Internet of Things • Mobile • Real-Time Analytics • Personalization • Catalog • Content Management.
  12. 12. Single View Internet of Things Mobile Real-Time Analytics Catalog Personalization Content Management MongoDB Use Cases
  13. 13. THE LARGEST ECOSYSTEM • 10,000,000+ MongoDB Downloads • 300,000+ Online Education Registrants • 40,000+ MongoDB Cloud Manager Users • 35,000+ MongoDB User Group Members • 1,000+ Technology and Services Partners • 2,000+ Customers Across All Industries
  14. 14. WHEN WOULD MYSQL BE A BETTER FIT? • Applications that require complex, multi-row transactions (e.g., a double- entry bookkeeping system) • MongoDB is not a drop-in replacement for legacy applications built around the relational data model and SQL.
  15. 15. SQL DATABASE VS MONGODB SQL Database NoSQL Database Relational database Non-relational database Supports SQL query language Supports JSON query language Table based Collection based and key-value pair Row based Document based Column based Field based Support foreign key No support for foreign key Support for triggers No Support for triggers Contains schema which is predefined Contains dynamic schema Not fit for hierarchical data storage Best fit for hierarchical data storage Vertically scalable - increasing RAM Horizontally scalable - add more servers Emphasizes on ACID properties (Atomicity, Consistency, Isolation and Durability) Emphasizes on CAP theorem (Consistency, Availability and Partition tolerance)
  16. 16. UNDERSTANDING THE DOCUMENT • var doc = { ‘_id’: ‘507f191e810c19729de860ea’, ‘createdBy’: DBRef(‘User’, ‘907f191e710c19729de860ea’), ‘name’: ‘Ankit Dhir’, ‘empID’: ‘01 ‘, ‘timestamp’: Date(’08-09-17’), ‘tags’: [‘MongoDB’, ‘NoSQL’], ‘comments’: [{ ‘author’: DBRef(‘User’, ’, ‘407f191e710c19729de860ea’), ‘date’: Date(’ 08-09-17’), ‘text’: ‘Good‘, ‘upvotes’: 7 ]} ObjectId Manual references
  17. 17. QUERY • Rich JavaScript based Query syntax • Allow us to deep, nested queries • Example • // find posts which has ‘MongoDB’ tag • db.posts.find({tags: ‘MongoDB’});
  18. 18. SOME COOL FEATURES • Horizontally Scalable Architectures - no joins + no complex transactions • Geo-spatial Indexes for Geo-spatial queries. $near, $within_distance, Bound queries (circle, box) • GridFS Stores Large Binary Files. • Map/Reduce GROUP BY in SQL, map/reduce in MongoDB.
  19. 19. HOW DO WE USE MONGODB AT HABILELABS • We use with Nodejs, generally as database of REST API Projects in MEAN stack • We use mongoosejs object modelling which help us in writing MongoDB validation, casting and business logic boilerplates • http://mongoosejs.com/
  20. 20. CONTACT US • Development Center : Habilelabs Pvt. Ltd. 4th Floor, I.G.M. Senior Secondary Public School Campus, Sec-93 Agarwal Farm, Mansarovar, Jaipur(Raj.) – 302020 • Email : info@Habilelabs.io • Web : https://habilelabs.io • Telephone: +91-9828247415 / +91-9887992695

×