SlideShare une entreprise Scribd logo
1  sur  19
Compare – DynamoDb vs. MongoDB
Higher Ed
2
Requirements
 Unstructured data storage
 ACID compliance not necessary
 Fast read/write
 Ability to index data and search
 Full text search (?)
 Java/Spring support
 JavaScript support
 REST API
 Community support
 Scaling up and maintenance
3
Shard – when database grows large
 Horizontal partitioning of database where rows are held in separate database
servers
 Compare that to normalization or vertical partitioning where data is split into
columns
 Advantages
• Reduces index size in each table in each database (performance +)
• Load can be spread out over multiple machines (performance ++)
 Disadvantages
• Increased reliance on interconnected servers
• Query latency when more than one shard is searched
• Issues with consistency and durability
4
DynamoDb Internals
 Key/Value Pair
• Uses JSON only as a transport protocol
• Data is not being stored "on-disk" in the JSON data format
• Applications that use DynamoDB must either implement their own JSON
parsing or use a library like one of the AWS SDKs to do this parsing for them.
 Data Types
• Scalar – string, number and binary (BLOB and CLOB)
• Multivalued – string set, number set and binary set
5
DynamoDb Internals
 Data Model
• Table – no fixed schema (columns, datatype etc)
 Needs a fixed primary key, its data type and secondary index (if necessary)
 Limit to 256 tables per region per account
• Items - individual records in a table
 Limited to 400 kb
• Attributes
• Support one-to-one, one-to-many and many-to-many relationship
6
DynamoDb Internals
 Keys - need to create at the table creation time
• Primary Keys – Hash, Hash and Range keys
• Local Secondary Keys – can access only single partition
 Limit – 5 indexes per table/ 20 attributes max
• Global Secondary Keys – can access any partition
 Limit – 5 indexes per table
 Creating a secondary index, you define the alternate key for the index, along with
any other attributes that you want to be projected in the index. DynamoDB copies
these attributes into the index, along with the primary key attributes from the table
 Add, update, delete action on table is automatically reflected on the index
7
DynamoDb Internals
 Throughput
• A read capacity unit size is 4 kb
• A write capacity unit size is 1 kb
• To read an item of 5kb the # of read capacity unit required = 2
• These units are defined while creating a table
• AWS sends alerts when these limits are exceeded
• AWS also throttles further request beyond the capacity defined
8
DynamoDb Operations
 Table level – create, update, delete, list, describe
 Item/attribute level – add, update, delete
 Query – query a table with hash key and range key. Result limits to 1 MB
 Scan – reads all items from a table. Slower than query
 Parallel scan is also available to makes things faster
 Supports pagination
9
DynamoDb Features
 Fully Managed NoSql database service – handles scaling, partitioning, upgrades
 Durable – automatically replicates to different availability zones
 Scalable – automatically distributes data to multiple server as size grows
 Fast – on EC2 instance single digit millisecond latency for item size of 1kb
• 5 ms for read, 10 ms for write
 Simple Administration – Amazon Web Console
 Fault Tolerant – automatically replicates data
 Flexible – each item in a table can have different number of attributes
 Indexing – primary key of each item. Global and local secondary indexes allow
user to query non-primary key attributes
 Secure – authentication, use of latest cryptographic technique, ability to integrate
with IAM (AWS Identity and access management)
10
DynamoDb Features
 Could be Cost-Effective – per 1kb item, $0.01/hour for every 10 writes/sec
• $0.01/hour for every 50 strongly consistent read/sec
• $0.28 per million writes
• $0.056 per million strongly consistent reads
• $1.00 per GB/month for indexed storage
 SDK – AWS SDK for Java/.NET/PHP etc.
• Supports all table operations, query and scans
 Service Oriented Architecture – Rest support – simple API, only 12 operations
• Data transfers as simple GET/POST/DELETE
 Large items can be stored in S3 buckets, thereby reducing cost
 Monitoring – AWS management console, Cloudwatch, Command line tool
11
DynamoDb Features
 Can be integrated with RedShift – a data warehousing tool
 DynamoDb Local - small client-side database and server that mimics the
DynamoDB service. Available as a .jar file
12
MongoDb Internals (derived from humongous)
 Document Oriented database
• Data is stored in BSON format (Binary JSON)
• Supports up-to 100 levels of nesting
 Data Types – BSON
• String, Integer, Boolean, Double, Arrays, Date*, Timestamp, Binary *, Null
• Min/Max keys – compare against lowest and highest BSON elements
• Object – embedded documents
• ObjectId* – store document’s ID
• Regular Expression *
• JavaScript code *
• Symbol – reserved for languages that use specific symbol type
* Indicates non-JSON types
13
MongoDb Internals (derived from humongous)
 Data Model
• Collections – documents that share similar structure
• Document – similar to rows in RDBMS
 Maximum BSON document size is 16 MB
• Field – similar to columns in RDBMS
14
MongoDb Query
 Query
• Key/value – key can be any field in the document, including the primary key
• Range – greater than, less than or equal to, between
• Geospatial – proximity criteria, intersection and inclusion
• Text search – result shows relevance order
• Aggregation – count, min, max, average etc
• Map reduce
 Covered Queries – queries that return only indexed fields
 Query Optimization – MongoDB performs automatic optimization
 When necessary developer can utilize more indexes through index intersection
15
MongoDb Index
 Index
• Unique
• Compound
• ArrayTime-to-live (TTL)
• Geospatial
• Sparse
• Text search
 Size of index entry must be less than 1024 bytes
 A single collection can have no more than 64 indexes
16
MongoDb – Sample Query
 Return states with populatin above 10 millions
db.zipcodes.aggregate( [
{ $group: { _id: "$state", totalPop: { $sum: "$pop" } } },
{ $match: { totalPop: { $gte: 10*1000*1000 } } }
] )
17
MongoDb Features
 Mongo Shell – JavaScript shell that supports nearly all MongoDB commands
 Auto Shard – automatically balances data in the cluster
 Automatic Replica Failover
 Query Router - queries that don’t use the shard key, the query router broadcasts
the query to all shards and aggregate and sort the results
 ACID compliant at the document level
 Security - MongoDB Enterprise Advance provides extensive support authentication,
authorization, auditing and encryption
 MondbOps manager – deploy, upgrade (no downtime), monitor, backup and scale
MongoDB instances.
• Hosted MongoDB Management Service also provides many of these capabilities
 Provides in-memory caching
18
MongoDb Features
 Large community support, 4th largest database in use right after SQL databases
 Spring Data Project for MongoDB
 Pluggable storage engine
• For low latency high performance – WiredTiger or in-memory
• Analytical process – HDFS storage engine
• Replica set automatically migrates independent of storage format – no complex
ETL
 Both Java and JavaScript API are available and documented
 MongoDB University provides free education
• https://university.mongodb.com/
 Third-party hosted support exists for MongoDB with various price plans
• https://mongolab.com/
• http://mongodirector.com/
19
References
 http://aws.amazon.com/dynamodb/
 http://www.mongodb.org/
 http://docs.aws.amazon.com/amazondynamodb/latest/developerguide
 http://db-engines.com/en/system/Amazon+DynamoDB%3BMongoDB – little old
 http://blog.cloudthat.in/5-reasons-why-dynamodb-is-better-than-mongodb/
 http://www.masonzhang.com/2013/08/7-reasons-you-should-use-mongodb-over.html
 http://www.mongodb.com/presentations/automate-mongodb-mongodb-management-service-0
 http://www.mongodb.com/presentations/webinar-enterprise-architects-view-mongodb-0

Contenu connexe

Tendances

Optimize MySQL Workloads with Amazon Elastic Block Store - February 2017 AWS ...
Optimize MySQL Workloads with Amazon Elastic Block Store - February 2017 AWS ...Optimize MySQL Workloads with Amazon Elastic Block Store - February 2017 AWS ...
Optimize MySQL Workloads with Amazon Elastic Block Store - February 2017 AWS ...Amazon Web Services
 
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013Amazon Web Services
 
AWS re:Invent 2016: Case Study: Librato's Experience Running Cassandra Using ...
AWS re:Invent 2016: Case Study: Librato's Experience Running Cassandra Using ...AWS re:Invent 2016: Case Study: Librato's Experience Running Cassandra Using ...
AWS re:Invent 2016: Case Study: Librato's Experience Running Cassandra Using ...Amazon Web Services
 
Making (Almost) Any Database Faster and Cheaper with Caching
Making (Almost) Any Database Faster and Cheaper with CachingMaking (Almost) Any Database Faster and Cheaper with Caching
Making (Almost) Any Database Faster and Cheaper with CachingAmazon Web Services
 
Getting Maximum Performance from Amazon Redshift: Complex Queries
Getting Maximum Performance from Amazon Redshift: Complex QueriesGetting Maximum Performance from Amazon Redshift: Complex Queries
Getting Maximum Performance from Amazon Redshift: Complex Queriestimonk
 
Uses and Best Practices for Amazon Redshift
Uses and Best Practices for Amazon RedshiftUses and Best Practices for Amazon Redshift
Uses and Best Practices for Amazon RedshiftAmazon Web Services
 
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB Day
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB DayChoosing the Right Database Service (김상필, 유타카 호시노) - AWS DB Day
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB DayAmazon Web Services Korea
 
Amazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service MeetupAmazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service Meetupcyrilkhairallah
 
Introduction to Database Services
Introduction to Database ServicesIntroduction to Database Services
Introduction to Database ServicesAmazon Web Services
 
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)Amazon Web Services
 
Getting Started with Amazon EC2 and Compute Services
Getting Started with Amazon EC2 and Compute ServicesGetting Started with Amazon EC2 and Compute Services
Getting Started with Amazon EC2 and Compute ServicesAmazon Web Services
 
AWS Summit London 2014 | Maximising EC2 and EBC Performance (400)
AWS Summit London 2014 | Maximising EC2 and EBC Performance (400)AWS Summit London 2014 | Maximising EC2 and EBC Performance (400)
AWS Summit London 2014 | Maximising EC2 and EBC Performance (400)Amazon Web Services
 
What’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLWhat’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLAmazon Web Services
 
Running MongoDB on AWS
Running MongoDB on AWSRunning MongoDB on AWS
Running MongoDB on AWSMongoDB
 
Database Migration – Simple, Cross-Engine and Cross-Platform Migration
Database Migration – Simple, Cross-Engine and Cross-Platform MigrationDatabase Migration – Simple, Cross-Engine and Cross-Platform Migration
Database Migration – Simple, Cross-Engine and Cross-Platform MigrationAmazon Web Services
 
AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)
AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)
AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)Amazon Web Services
 

Tendances (20)

Optimize MySQL Workloads with Amazon Elastic Block Store - February 2017 AWS ...
Optimize MySQL Workloads with Amazon Elastic Block Store - February 2017 AWS ...Optimize MySQL Workloads with Amazon Elastic Block Store - February 2017 AWS ...
Optimize MySQL Workloads with Amazon Elastic Block Store - February 2017 AWS ...
 
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013
Scaling MongoDB on Amazon Web Services (DAT209) | AWS re:Invent 2013
 
What's New in Amazon Aurora
What's New in Amazon AuroraWhat's New in Amazon Aurora
What's New in Amazon Aurora
 
AWS re:Invent 2016: Case Study: Librato's Experience Running Cassandra Using ...
AWS re:Invent 2016: Case Study: Librato's Experience Running Cassandra Using ...AWS re:Invent 2016: Case Study: Librato's Experience Running Cassandra Using ...
AWS re:Invent 2016: Case Study: Librato's Experience Running Cassandra Using ...
 
Making (Almost) Any Database Faster and Cheaper with Caching
Making (Almost) Any Database Faster and Cheaper with CachingMaking (Almost) Any Database Faster and Cheaper with Caching
Making (Almost) Any Database Faster and Cheaper with Caching
 
Getting Maximum Performance from Amazon Redshift: Complex Queries
Getting Maximum Performance from Amazon Redshift: Complex QueriesGetting Maximum Performance from Amazon Redshift: Complex Queries
Getting Maximum Performance from Amazon Redshift: Complex Queries
 
Uses and Best Practices for Amazon Redshift
Uses and Best Practices for Amazon RedshiftUses and Best Practices for Amazon Redshift
Uses and Best Practices for Amazon Redshift
 
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB Day
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB DayChoosing the Right Database Service (김상필, 유타카 호시노) - AWS DB Day
Choosing the Right Database Service (김상필, 유타카 호시노) - AWS DB Day
 
Amazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service MeetupAmazon Web Services - Relational Database Service Meetup
Amazon Web Services - Relational Database Service Meetup
 
Introduction to Database Services
Introduction to Database ServicesIntroduction to Database Services
Introduction to Database Services
 
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
SRV413 Deep Dive on Elastic Block Storage (Amazon EBS)
 
Getting Started with Amazon EC2 and Compute Services
Getting Started with Amazon EC2 and Compute ServicesGetting Started with Amazon EC2 and Compute Services
Getting Started with Amazon EC2 and Compute Services
 
DynamodbDB Deep Dive
DynamodbDB Deep DiveDynamodbDB Deep Dive
DynamodbDB Deep Dive
 
AWS Summit London 2014 | Maximising EC2 and EBC Performance (400)
AWS Summit London 2014 | Maximising EC2 and EBC Performance (400)AWS Summit London 2014 | Maximising EC2 and EBC Performance (400)
AWS Summit London 2014 | Maximising EC2 and EBC Performance (400)
 
What’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQLWhat’s New in Amazon Aurora for MySQL and PostgreSQL
What’s New in Amazon Aurora for MySQL and PostgreSQL
 
Running MongoDB on AWS
Running MongoDB on AWSRunning MongoDB on AWS
Running MongoDB on AWS
 
Database Migration – Simple, Cross-Engine and Cross-Platform Migration
Database Migration – Simple, Cross-Engine and Cross-Platform MigrationDatabase Migration – Simple, Cross-Engine and Cross-Platform Migration
Database Migration – Simple, Cross-Engine and Cross-Platform Migration
 
Deep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDBDeep Dive on Amazon DynamoDB
Deep Dive on Amazon DynamoDB
 
Servicios de Almacenamiento en AWS
Servicios de Almacenamiento en AWSServicios de Almacenamiento en AWS
Servicios de Almacenamiento en AWS
 
AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)
AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)
AWS re:Invent 2016: Amazon Aurora Deep Dive (GPST402)
 

En vedette

Dynamo db pros and cons
Dynamo db  pros and consDynamo db  pros and cons
Dynamo db pros and consSaniya Khalsa
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Consjohnrjenson
 
Strengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBStrengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBlehresman
 
Deep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million UsersDeep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million UsersAmazon Web Services
 
Design Patterns using Amazon DynamoDB
 Design Patterns using Amazon DynamoDB Design Patterns using Amazon DynamoDB
Design Patterns using Amazon DynamoDBAmazon Web Services
 
Building Applications with DynamoDB
Building Applications with DynamoDBBuilding Applications with DynamoDB
Building Applications with DynamoDBAmazon Web Services
 
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL databaseHBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL databaseEdureka!
 
Comparing Affiliate Networks
Comparing Affiliate NetworksComparing Affiliate Networks
Comparing Affiliate NetworksTricia Meyer
 
An introduction to cloud computing with Amazon Web Services and MongoDB
An introduction to cloud computing with Amazon Web Services and MongoDBAn introduction to cloud computing with Amazon Web Services and MongoDB
An introduction to cloud computing with Amazon Web Services and MongoDBSamuel Demharter
 
DAT101 Understanding AWS Database Options - AWS re: Invent 2012
DAT101 Understanding AWS Database Options - AWS re: Invent 2012DAT101 Understanding AWS Database Options - AWS re: Invent 2012
DAT101 Understanding AWS Database Options - AWS re: Invent 2012Amazon Web Services
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDBStone Gao
 
DynamoDB: um banco NoSQL
DynamoDB: um banco NoSQLDynamoDB: um banco NoSQL
DynamoDB: um banco NoSQLCaliel Costa
 
DocumentDB - NoSQL on Cloud at Reboot2015
DocumentDB - NoSQL on Cloud at Reboot2015DocumentDB - NoSQL on Cloud at Reboot2015
DocumentDB - NoSQL on Cloud at Reboot2015Vidyasagar Machupalli
 
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014Amazon Web Services
 
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013Amazon Web Services
 
Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.Dhaval Dalal
 
8 ways to leverage AWS Lambda in your Big Data workloads
8 ways to leverage AWS Lambda in your Big Data workloads8 ways to leverage AWS Lambda in your Big Data workloads
8 ways to leverage AWS Lambda in your Big Data workloadsAdrian Hornsby
 
Tweaking performance on high-load projects
Tweaking performance on high-load projectsTweaking performance on high-load projects
Tweaking performance on high-load projectsDmitriy Dumanskiy
 

En vedette (20)

El uso de la c
El uso de la cEl uso de la c
El uso de la c
 
Dynamo db pros and cons
Dynamo db  pros and consDynamo db  pros and cons
Dynamo db pros and cons
 
Deep Dive: Amazon DynamoDB
Deep Dive: Amazon DynamoDBDeep Dive: Amazon DynamoDB
Deep Dive: Amazon DynamoDB
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Cons
 
Strengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDBStrengths and Weaknesses of MongoDB
Strengths and Weaknesses of MongoDB
 
Deep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million UsersDeep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million Users
 
Design Patterns using Amazon DynamoDB
 Design Patterns using Amazon DynamoDB Design Patterns using Amazon DynamoDB
Design Patterns using Amazon DynamoDB
 
Building Applications with DynamoDB
Building Applications with DynamoDBBuilding Applications with DynamoDB
Building Applications with DynamoDB
 
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL databaseHBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
HBase Vs Cassandra Vs MongoDB - Choosing the right NoSQL database
 
Comparing Affiliate Networks
Comparing Affiliate NetworksComparing Affiliate Networks
Comparing Affiliate Networks
 
An introduction to cloud computing with Amazon Web Services and MongoDB
An introduction to cloud computing with Amazon Web Services and MongoDBAn introduction to cloud computing with Amazon Web Services and MongoDB
An introduction to cloud computing with Amazon Web Services and MongoDB
 
DAT101 Understanding AWS Database Options - AWS re: Invent 2012
DAT101 Understanding AWS Database Options - AWS re: Invent 2012DAT101 Understanding AWS Database Options - AWS re: Invent 2012
DAT101 Understanding AWS Database Options - AWS re: Invent 2012
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDB
 
DynamoDB: um banco NoSQL
DynamoDB: um banco NoSQLDynamoDB: um banco NoSQL
DynamoDB: um banco NoSQL
 
DocumentDB - NoSQL on Cloud at Reboot2015
DocumentDB - NoSQL on Cloud at Reboot2015DocumentDB - NoSQL on Cloud at Reboot2015
DocumentDB - NoSQL on Cloud at Reboot2015
 
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
(BDT307) Running NoSQL on Amazon EC2 | AWS re:Invent 2014
 
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
 
Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.Midas - on-the-fly schema migration tool for MongoDB.
Midas - on-the-fly schema migration tool for MongoDB.
 
8 ways to leverage AWS Lambda in your Big Data workloads
8 ways to leverage AWS Lambda in your Big Data workloads8 ways to leverage AWS Lambda in your Big Data workloads
8 ways to leverage AWS Lambda in your Big Data workloads
 
Tweaking performance on high-load projects
Tweaking performance on high-load projectsTweaking performance on high-load projects
Tweaking performance on high-load projects
 

Similaire à Compare DynamoDB vs. MongoDB

Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Emprovise
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring dataJimmy Ray
 
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...MongoDB
 
MongoDB.local DC 2018: Solving Your Backup Needs Using MongoDB Ops Manager, C...
MongoDB.local DC 2018: Solving Your Backup Needs Using MongoDB Ops Manager, C...MongoDB.local DC 2018: Solving Your Backup Needs Using MongoDB Ops Manager, C...
MongoDB.local DC 2018: Solving Your Backup Needs Using MongoDB Ops Manager, C...MongoDB
 
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersNiko Neugebauer
 
Scaling MongoDB - Presentation at MTP
Scaling MongoDB - Presentation at MTPScaling MongoDB - Presentation at MTP
Scaling MongoDB - Presentation at MTPdarkdata
 
MongoDB Internals
MongoDB InternalsMongoDB Internals
MongoDB InternalsSiraj Memon
 
Agility and Scalability with MongoDB
Agility and Scalability with MongoDBAgility and Scalability with MongoDB
Agility and Scalability with MongoDBMongoDB
 
Solving Your Backup Needs Using MongoDB Ops Manager, Cloud Manager and Atlas
Solving Your Backup Needs Using MongoDB Ops Manager, Cloud Manager and AtlasSolving Your Backup Needs Using MongoDB Ops Manager, Cloud Manager and Atlas
Solving Your Backup Needs Using MongoDB Ops Manager, Cloud Manager and AtlasMongoDB
 
MongoDB Knowledge Shareing
MongoDB Knowledge ShareingMongoDB Knowledge Shareing
MongoDB Knowledge ShareingPhilip Zhong
 
MongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & PerformanceMongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & PerformanceSasidhar Gogulapati
 
How & When to Use NoSQL at Websummit Dublin
How & When to Use NoSQL at Websummit DublinHow & When to Use NoSQL at Websummit Dublin
How & When to Use NoSQL at Websummit DublinAmazon Web Services
 
The Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterThe Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterChris Henry
 
DynamoDB Gluecon 2012
DynamoDB Gluecon 2012DynamoDB Gluecon 2012
DynamoDB Gluecon 2012Appirio
 
Gluecon 2012 - DynamoDB
Gluecon 2012 - DynamoDBGluecon 2012 - DynamoDB
Gluecon 2012 - DynamoDBJeff Douglas
 
No SQL : Which way to go? Presented at DDDMelbourne 2015
No SQL : Which way to go?  Presented at DDDMelbourne 2015No SQL : Which way to go?  Presented at DDDMelbourne 2015
No SQL : Which way to go? Presented at DDDMelbourne 2015Himanshu Desai
 

Similaire à Compare DynamoDB vs. MongoDB (20)

Drop acid
Drop acidDrop acid
Drop acid
 
No sq lv1_0
No sq lv1_0No sq lv1_0
No sq lv1_0
 
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
Highlights of AWS ReInvent 2023 (Announcements and Best Practices)
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
 
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...
 
MongoDB.local DC 2018: Solving Your Backup Needs Using MongoDB Ops Manager, C...
MongoDB.local DC 2018: Solving Your Backup Needs Using MongoDB Ops Manager, C...MongoDB.local DC 2018: Solving Your Backup Needs Using MongoDB Ops Manager, C...
MongoDB.local DC 2018: Solving Your Backup Needs Using MongoDB Ops Manager, C...
 
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & Developers
 
Scaling MongoDB - Presentation at MTP
Scaling MongoDB - Presentation at MTPScaling MongoDB - Presentation at MTP
Scaling MongoDB - Presentation at MTP
 
MongoDB Internals
MongoDB InternalsMongoDB Internals
MongoDB Internals
 
Agility and Scalability with MongoDB
Agility and Scalability with MongoDBAgility and Scalability with MongoDB
Agility and Scalability with MongoDB
 
Solving Your Backup Needs Using MongoDB Ops Manager, Cloud Manager and Atlas
Solving Your Backup Needs Using MongoDB Ops Manager, Cloud Manager and AtlasSolving Your Backup Needs Using MongoDB Ops Manager, Cloud Manager and Atlas
Solving Your Backup Needs Using MongoDB Ops Manager, Cloud Manager and Atlas
 
MongoDB Knowledge Shareing
MongoDB Knowledge ShareingMongoDB Knowledge Shareing
MongoDB Knowledge Shareing
 
MongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & PerformanceMongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & Performance
 
How & When to Use NoSQL at Websummit Dublin
How & When to Use NoSQL at Websummit DublinHow & When to Use NoSQL at Websummit Dublin
How & When to Use NoSQL at Websummit Dublin
 
The Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb ClusterThe Care + Feeding of a Mongodb Cluster
The Care + Feeding of a Mongodb Cluster
 
DynamoDB Gluecon 2012
DynamoDB Gluecon 2012DynamoDB Gluecon 2012
DynamoDB Gluecon 2012
 
Gluecon 2012 - DynamoDB
Gluecon 2012 - DynamoDBGluecon 2012 - DynamoDB
Gluecon 2012 - DynamoDB
 
KeyValue Stores
KeyValue StoresKeyValue Stores
KeyValue Stores
 
No SQL : Which way to go? Presented at DDDMelbourne 2015
No SQL : Which way to go?  Presented at DDDMelbourne 2015No SQL : Which way to go?  Presented at DDDMelbourne 2015
No SQL : Which way to go? Presented at DDDMelbourne 2015
 
NoSQL, which way to go?
NoSQL, which way to go?NoSQL, which way to go?
NoSQL, which way to go?
 

Dernier

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 

Dernier (20)

Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

Compare DynamoDB vs. MongoDB

  • 1. Compare – DynamoDb vs. MongoDB Higher Ed
  • 2. 2 Requirements  Unstructured data storage  ACID compliance not necessary  Fast read/write  Ability to index data and search  Full text search (?)  Java/Spring support  JavaScript support  REST API  Community support  Scaling up and maintenance
  • 3. 3 Shard – when database grows large  Horizontal partitioning of database where rows are held in separate database servers  Compare that to normalization or vertical partitioning where data is split into columns  Advantages • Reduces index size in each table in each database (performance +) • Load can be spread out over multiple machines (performance ++)  Disadvantages • Increased reliance on interconnected servers • Query latency when more than one shard is searched • Issues with consistency and durability
  • 4. 4 DynamoDb Internals  Key/Value Pair • Uses JSON only as a transport protocol • Data is not being stored "on-disk" in the JSON data format • Applications that use DynamoDB must either implement their own JSON parsing or use a library like one of the AWS SDKs to do this parsing for them.  Data Types • Scalar – string, number and binary (BLOB and CLOB) • Multivalued – string set, number set and binary set
  • 5. 5 DynamoDb Internals  Data Model • Table – no fixed schema (columns, datatype etc)  Needs a fixed primary key, its data type and secondary index (if necessary)  Limit to 256 tables per region per account • Items - individual records in a table  Limited to 400 kb • Attributes • Support one-to-one, one-to-many and many-to-many relationship
  • 6. 6 DynamoDb Internals  Keys - need to create at the table creation time • Primary Keys – Hash, Hash and Range keys • Local Secondary Keys – can access only single partition  Limit – 5 indexes per table/ 20 attributes max • Global Secondary Keys – can access any partition  Limit – 5 indexes per table  Creating a secondary index, you define the alternate key for the index, along with any other attributes that you want to be projected in the index. DynamoDB copies these attributes into the index, along with the primary key attributes from the table  Add, update, delete action on table is automatically reflected on the index
  • 7. 7 DynamoDb Internals  Throughput • A read capacity unit size is 4 kb • A write capacity unit size is 1 kb • To read an item of 5kb the # of read capacity unit required = 2 • These units are defined while creating a table • AWS sends alerts when these limits are exceeded • AWS also throttles further request beyond the capacity defined
  • 8. 8 DynamoDb Operations  Table level – create, update, delete, list, describe  Item/attribute level – add, update, delete  Query – query a table with hash key and range key. Result limits to 1 MB  Scan – reads all items from a table. Slower than query  Parallel scan is also available to makes things faster  Supports pagination
  • 9. 9 DynamoDb Features  Fully Managed NoSql database service – handles scaling, partitioning, upgrades  Durable – automatically replicates to different availability zones  Scalable – automatically distributes data to multiple server as size grows  Fast – on EC2 instance single digit millisecond latency for item size of 1kb • 5 ms for read, 10 ms for write  Simple Administration – Amazon Web Console  Fault Tolerant – automatically replicates data  Flexible – each item in a table can have different number of attributes  Indexing – primary key of each item. Global and local secondary indexes allow user to query non-primary key attributes  Secure – authentication, use of latest cryptographic technique, ability to integrate with IAM (AWS Identity and access management)
  • 10. 10 DynamoDb Features  Could be Cost-Effective – per 1kb item, $0.01/hour for every 10 writes/sec • $0.01/hour for every 50 strongly consistent read/sec • $0.28 per million writes • $0.056 per million strongly consistent reads • $1.00 per GB/month for indexed storage  SDK – AWS SDK for Java/.NET/PHP etc. • Supports all table operations, query and scans  Service Oriented Architecture – Rest support – simple API, only 12 operations • Data transfers as simple GET/POST/DELETE  Large items can be stored in S3 buckets, thereby reducing cost  Monitoring – AWS management console, Cloudwatch, Command line tool
  • 11. 11 DynamoDb Features  Can be integrated with RedShift – a data warehousing tool  DynamoDb Local - small client-side database and server that mimics the DynamoDB service. Available as a .jar file
  • 12. 12 MongoDb Internals (derived from humongous)  Document Oriented database • Data is stored in BSON format (Binary JSON) • Supports up-to 100 levels of nesting  Data Types – BSON • String, Integer, Boolean, Double, Arrays, Date*, Timestamp, Binary *, Null • Min/Max keys – compare against lowest and highest BSON elements • Object – embedded documents • ObjectId* – store document’s ID • Regular Expression * • JavaScript code * • Symbol – reserved for languages that use specific symbol type * Indicates non-JSON types
  • 13. 13 MongoDb Internals (derived from humongous)  Data Model • Collections – documents that share similar structure • Document – similar to rows in RDBMS  Maximum BSON document size is 16 MB • Field – similar to columns in RDBMS
  • 14. 14 MongoDb Query  Query • Key/value – key can be any field in the document, including the primary key • Range – greater than, less than or equal to, between • Geospatial – proximity criteria, intersection and inclusion • Text search – result shows relevance order • Aggregation – count, min, max, average etc • Map reduce  Covered Queries – queries that return only indexed fields  Query Optimization – MongoDB performs automatic optimization  When necessary developer can utilize more indexes through index intersection
  • 15. 15 MongoDb Index  Index • Unique • Compound • ArrayTime-to-live (TTL) • Geospatial • Sparse • Text search  Size of index entry must be less than 1024 bytes  A single collection can have no more than 64 indexes
  • 16. 16 MongoDb – Sample Query  Return states with populatin above 10 millions db.zipcodes.aggregate( [ { $group: { _id: "$state", totalPop: { $sum: "$pop" } } }, { $match: { totalPop: { $gte: 10*1000*1000 } } } ] )
  • 17. 17 MongoDb Features  Mongo Shell – JavaScript shell that supports nearly all MongoDB commands  Auto Shard – automatically balances data in the cluster  Automatic Replica Failover  Query Router - queries that don’t use the shard key, the query router broadcasts the query to all shards and aggregate and sort the results  ACID compliant at the document level  Security - MongoDB Enterprise Advance provides extensive support authentication, authorization, auditing and encryption  MondbOps manager – deploy, upgrade (no downtime), monitor, backup and scale MongoDB instances. • Hosted MongoDB Management Service also provides many of these capabilities  Provides in-memory caching
  • 18. 18 MongoDb Features  Large community support, 4th largest database in use right after SQL databases  Spring Data Project for MongoDB  Pluggable storage engine • For low latency high performance – WiredTiger or in-memory • Analytical process – HDFS storage engine • Replica set automatically migrates independent of storage format – no complex ETL  Both Java and JavaScript API are available and documented  MongoDB University provides free education • https://university.mongodb.com/  Third-party hosted support exists for MongoDB with various price plans • https://mongolab.com/ • http://mongodirector.com/
  • 19. 19 References  http://aws.amazon.com/dynamodb/  http://www.mongodb.org/  http://docs.aws.amazon.com/amazondynamodb/latest/developerguide  http://db-engines.com/en/system/Amazon+DynamoDB%3BMongoDB – little old  http://blog.cloudthat.in/5-reasons-why-dynamodb-is-better-than-mongodb/  http://www.masonzhang.com/2013/08/7-reasons-you-should-use-mongodb-over.html  http://www.mongodb.com/presentations/automate-mongodb-mongodb-management-service-0  http://www.mongodb.com/presentations/webinar-enterprise-architects-view-mongodb-0