SlideShare a Scribd company logo
1 of 44
NoSQL: Which way to go?
DDDMelbourne2015
HimanshuDesai,AhmedElharouny&DanielJanczak
About us
• Himanshu Desai (@H_Desai)
• Ahmed Elharouny(@Harouny)
• Daniel Janczak (@DanielJanczak)
And we all work for Readify
Page
Why NoSQL?
Scale
Pros
NoSQL technologies can offer
more scalability than relational
databases
Cons
Often lose some benefits of
relational databases e.g.
database-wide transactions
Better Formats
Pros
Avoiding ORMs
Cons
Limited BI tooling, Data
hard to share outside the
application
Work in more flexible
ways
Pros
No fixed schemas
Cons
Fixed schemas help
prevent errors
Page
Document Database Database
CollectionsCollections
Database
{
“title”: “Justin …”,
“genre”: “Pop”,
“price”: 36
}
Document 1
{
“title”: “Don’t Spe..”,
“genre”: “Techno”,
“price”: 42.99
}
Document 2
{
“numberOfSongs”: 2,
“last”: “Jan 1, 2015”
}
Document 3
Request
Application
{ }
RavenDB
What is RavenDB?
› Open source NoSQL database for .NET
› Developed by Hibernating Rhinos Ltd
› Available
› As a standalone package
› As embedded version
› On Azure and Amazon
Schema-free
Store data as Plain Old C# Object
(POCO)
Or directly as JSON
var author = new Author {
Name = "George Martin",
Books = new[] {
new Book {Title = "A Game of Thrones"},
new Book {Title = "A Clash of Kings"}
}
};
session.Store(author);
{
"Name": "George Martin",
"Books": [
{
"Title": "A Game of Thrones",
"Genre": "Fantasy"
},
{
"Title": "A Clash of Kings",
"Genre": "Fantasy
}
]
}
Scalable
› Replication
› “Keepcopiesofmydatasomewhereelse”
› Sharding
› “Splitmyhugedatabaseintosmallerparts”
› Multi-tenancy
› “Singleinstanceservesmultiplecustomers=manydatabasesper
server”
Extensible
› Useexisting bundles
› Compression
› Encryption
› Expiration
› PeriodicExport
› Quotas
› Replication
› ScriptedIndex
› SQLReplication
› Versioning
› Orwriteyour ownplugins
› Triggers
› Codecs
› Tasks
› Compilation Extensions
› AnalyzerGenerators
› Databaseconfiguration
› Customsorters
Easy to use
› .NETandJAVAclient
› LINQtoquerydata
› RESTAPI
› GEThttp://localhost:8080/docs/bobs_address
› PUThttp://localhost:8080/docs/bobs_address -d"{FirstName:'Bob',
LastName:'Smith',Address:'5ElmSt'}“
› Andsoon…
Easy to manage
› .Built-inmanagementtool–noneedtodownloadanythingextra
Optimized
› Transactional(ACID)ondocumentoperations
› InplainEnglish“yourdataissafe”
› ButonlyBASEforqueries
› “BasicallyAvailable,Softstate,EventualConsistency”
› InplainEnglish:
› youwillalwaysgettheresultsofyourqueriesasfastaspossible
› buttheresultswon’talwaysbeuptodateuntildatabasefinishes
indexing
› Ifyouwantthemuptodate,youhavetodemanditexplicitly
Eventual consistency
Good or bad ?
Newspaper Good! Very few writes, thousands of
reads, doesn’t have to be immediate
Product signup Good! All applicant information held
together
Banking system What if the credits and debits sometimes
don’t match?
Patient drug
monitoring
What if the drug doses are not updated
on time?
Our test data
public class Author {
public string Name {get; set;}
public string Surname {get; set;}
public Book[] Books {get; set;}
}
public class Book {
public string Title {get; set;}
public string Genre {get; set;}
public DateTime? PublishedOn {get; set;}
public decimal? Price {get; set;}
}
Our test data continues…
• George Martin
• A Game of Thrones, Fantasy, 6/8/1996, $12.34
• A Clash of Kings, Fantasy, 16/11/1998
• Dan Simmons
• Hyperion, Science Fiction, 1/1/1989, $34.56
• Terror, Thriller, 8/1/2007, $23.45
• John Tolkien
• Hobbit, Fantasy, 21/9/1937, $12.34
• Stephen King
• The Stand, Horror, 1/9/1978, $12.34
A quick look at code
Code samples:
https://github.com/danieljanczak/ddd-melb2015-ravendb-samples
MongoDB
A scalable, high-performance, open source, schema-free, document-
oriented database.
- mongodb.org
What is MongoDB?
MongoDB Popularity
Source: db-engins.com
MongoDBFeatures
The best features of key/values stores, document databases and relational
databases in one.
• Open source
MongoDB Features
The best features of key/values stores, document databases and relational
databases in one.
• Open source
• Cross platform
The best features of key/values stores, document databases and relational
databases in one.
MongoDB Features
• Open source
• Cross platform
• Strong indexing
The best features of key/values stores, document databases and relational
databases in one.
MongoDB Features
• Open source
• Cross platform
• Strong indexing
• Strong query language
The best features of key/values stores, document databases and relational
databases in one.
MongoDB Features
• Open source
• Cross platform
• Strong indexing
• Strong query language
• Replication
The best features of key/values stores, document databases and relational
databases in one.
MongoDB Features
• Open source
• Cross platform
• Strong indexing
• Strong query language
• Replication
• Sharding
The best features of key/values stores, document databases and relational
databases in one.
MongoDB Features
• Open source
• Cross platform
• Strong indexing
• Strong query language
• Replication
• Sharding
• Native drivers
The best features of key/values stores, document databases and relational
databases in one.
MongoDB Features
• Open source
• Cross platform
• Strong indexing
• Strong query language
• Replication
• Sharding
• Native drivers
• File storage (GridFS)
The best features of key/values stores, document databases and relational
databases in one.
MongoDB Features
• Open source
• Cross platform
• Strong indexing
• Strong query language
• Replication
• Sharding
• Native drivers
• File storage (GridFS)
• Aggregation framework + MapReduce
MongoDB Getting Started
1
DOWNLOAD
MongoDB 64 Bit for
Windows
(Link)
2
Create Data Directory
3
Start MongoDB
Demo
Code samples:
https://gist.github.com/harouny/a29e5455d9ea9d773a6e
https://gist.github.com/harouny/a00db1065fbbcfa8d79b
DocumentDB
How would you access it?
Application
Database
Collections
Stored
Procedures
Triggers UDFs
Documents
Libraries:
.NET, JavaScript,
Node.js, Python,
…
REST
Collections
Database
DocumentDB
Working with data
RESTful access methods
For Create/Read/Update/Delete
(CRUD) operations
DocumentDB SQL
A query language with SQL-
derived syntax
Example:
SELECT c.Books
FROM Authors c
WHERE c.name =
“George"
Executing logic in the DB
( Javascript)
Stored procedures
Triggers
User-defined functions
(UDFs)
- Allow extending
DocumentDB SQL
Sharding and Transaction
Collection Collection Collection
Database
JSON
JSON
JSON
JSON
JSON
JSON
JSON
JSON
Collection
JSON
JSON
JSON
The unit of
Sharding is a
collection is a
collection
Atomic transactions can span
only a single collection
collection
.NET Development
• You need following from the portal after provision a database
• Endpoint Url
• Authorization key
• Nu-get package
• Install-Package Microsoft.Azure.DocumentDB
• Use them to create DocumentClient
Demo
Page
In a nutshell
In a nutshell - ACID
• RavenDB
• Fully transactional writes on document level, even between collections
• Reads use eventual consistency
• Support for DTS
• MongoDB
• Only supports ACID transactions at the document level.
• Multi-collection (table) transactions not supported.
• Users can choose the level of consistency using (WriteConcern and ReadPreference)
• DocumentDB
• Full ACID support on the collection level
• 4 levels of consistency, Extremely rich query model.
In a nutshell - availability and tooling
• RavenDB
• On-prem (Windows), Cloud (RavenHQ) on Azure and Amazon, Embedded version / unit testing
• Built in web based Management Studio
• .NET and JAVA drivers, REST API
• Possible access through LinqPad
• MongoDB
• On-prem (Windows, Linx, Mac), Cloud (i.e MongoLab)
• MongoDB Cloud Manager (monitoring, automated management)
• Mongo Shell
• Lots of 3rd party GUIs i.e. Robomongo
• DocumentDB
• Accessed from virtually “any” system. Available in “Azure” only at this point.
• Azure Web Portal
• DocumentDB Studio
• LinqPad
• SDK available for various platform and REST based access
In a nutshell – querying and indexing
• RavenDB
• Only very basic queries supported without static indexes
• Map-reduce
• Full text search
• Eventual consistency by default
• MongoDB
• Strong indexing (_id indexed by default, custom indexes, compound, unique, text). Async indexing.
• Query from primary by default (Strong consistency)
• Query from “nearest” if needed (Eventual consistency)
• When writing you choose when to consider write operation successful.
• DocumentDB
• Very rich query model – Supports Linq to objects, Lambda expression and SQL style syntax. Supports
Stored procedure, triggers and UDFs
• Auto index by default.
• Support lazy indexing if required.
• 4 levels of consistency to choose from (Strong, Session, Bounded Stalesness,Eventual consistency
In a nutshell - performance
• RavenDB
• Writes directly to disk (safety over speed)
• Indexing in the background
• Query results are instantly available in indexes
• May need to wait for specific update
• MongoDB
• TCP/IP based communication.
• Uses BSON (lightweight, traversable, efficient).
• MMAPv1 storage engine uses OS memory mapped files.
• Wiredtiger storage engine (7,000,000 op/second 28 threads).
• Choose level of performance vs consistency.
• DocumentDB
• 3 Levels of performance offered.
• Normalised CPU, memory, Disk and network as Request Units (RU)
• TCP/HTTPS based access available
In a nutshell – gotchas!
• RavenDB
• Need to reset underlying Lucene indexes – they do crash
• Database defaults (winning numbers: 15, 50, 16384; 128, 1024)
• Static indexes
• Eventual consistency
• MongoDB
• 32-bit limitations
• Max document size 16 MB
• Modeling currency
• DocumentDB
• Max response size : 1MB
• Max request size including attachment: 512KB.
• Consistency is set at database level not at collection level.
Thank you

More Related Content

What's hot

Azure Stream Analytics
Azure Stream AnalyticsAzure Stream Analytics
Azure Stream AnalyticsMarco Parenzan
 
A developer's introduction to big data processing with Azure Databricks
A developer's introduction to big data processing with Azure DatabricksA developer's introduction to big data processing with Azure Databricks
A developer's introduction to big data processing with Azure DatabricksMicrosoft Tech Community
 
Building big data solutions on azure
Building big data solutions on azureBuilding big data solutions on azure
Building big data solutions on azureEyal Ben Ivri
 
Wrangling data like a boss
Wrangling data like a bossWrangling data like a boss
Wrangling data like a bossStephanie Locke
 
Top 5 Things to Know About Integrating MongoDB into Your Data Warehouse
Top 5 Things to Know About Integrating MongoDB into Your Data WarehouseTop 5 Things to Know About Integrating MongoDB into Your Data Warehouse
Top 5 Things to Know About Integrating MongoDB into Your Data WarehouseMongoDB
 
Introducing Databricks Delta
Introducing Databricks DeltaIntroducing Databricks Delta
Introducing Databricks DeltaDatabricks
 
Big data on Azure for Architects
Big data on Azure for ArchitectsBig data on Azure for Architects
Big data on Azure for ArchitectsTomasz Kopacz
 
10 Big Data Technologies you Didn't Know About
10 Big Data Technologies you Didn't Know About 10 Big Data Technologies you Didn't Know About
10 Big Data Technologies you Didn't Know About Jesus Rodriguez
 
Verizon Centralizes Data into a Data Lake in Real Time for Analytics
Verizon Centralizes Data into a Data Lake in Real Time for AnalyticsVerizon Centralizes Data into a Data Lake in Real Time for Analytics
Verizon Centralizes Data into a Data Lake in Real Time for AnalyticsDataWorks Summit
 
Cortana Analytics Workshop: Operationalizing Your End-to-End Analytics Solution
Cortana Analytics Workshop: Operationalizing Your End-to-End Analytics SolutionCortana Analytics Workshop: Operationalizing Your End-to-End Analytics Solution
Cortana Analytics Workshop: Operationalizing Your End-to-End Analytics SolutionMSAdvAnalytics
 
Best Practices: Hadoop migration to Azure HDInsight
Best Practices: Hadoop migration to Azure HDInsightBest Practices: Hadoop migration to Azure HDInsight
Best Practices: Hadoop migration to Azure HDInsightRevin Chalil
 
Personalization Journey: From Single Node to Cloud Streaming
Personalization Journey: From Single Node to Cloud StreamingPersonalization Journey: From Single Node to Cloud Streaming
Personalization Journey: From Single Node to Cloud StreamingDatabricks
 
Integration Monday - Analysing StackExchange data with Azure Data Lake
Integration Monday - Analysing StackExchange data with Azure Data LakeIntegration Monday - Analysing StackExchange data with Azure Data Lake
Integration Monday - Analysing StackExchange data with Azure Data LakeTom Kerkhove
 
Encryption and Masking for Sensitive Apache Spark Analytics Addressing CCPA a...
Encryption and Masking for Sensitive Apache Spark Analytics Addressing CCPA a...Encryption and Masking for Sensitive Apache Spark Analytics Addressing CCPA a...
Encryption and Masking for Sensitive Apache Spark Analytics Addressing CCPA a...Databricks
 
Calum McCrea, Software Engineer at Kx Systems, "Kx: How Wall Street Tech can ...
Calum McCrea, Software Engineer at Kx Systems, "Kx: How Wall Street Tech can ...Calum McCrea, Software Engineer at Kx Systems, "Kx: How Wall Street Tech can ...
Calum McCrea, Software Engineer at Kx Systems, "Kx: How Wall Street Tech can ...Dataconomy Media
 
Entity Resolution Service - Bringing Petabytes of Data Online for Instant Access
Entity Resolution Service - Bringing Petabytes of Data Online for Instant AccessEntity Resolution Service - Bringing Petabytes of Data Online for Instant Access
Entity Resolution Service - Bringing Petabytes of Data Online for Instant AccessDataWorks Summit
 
Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardDelta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardParis Data Engineers !
 
WhereHows: Taming Metadata for 150K Datasets Over 9 Data Platforms
WhereHows: Taming Metadata for 150K Datasets Over 9 Data PlatformsWhereHows: Taming Metadata for 150K Datasets Over 9 Data Platforms
WhereHows: Taming Metadata for 150K Datasets Over 9 Data PlatformsMars Lan
 
Towards Digital Twin standards following an open source approach
Towards Digital Twin standards following an open source approachTowards Digital Twin standards following an open source approach
Towards Digital Twin standards following an open source approachFIWARE
 
Automating Data Quality Processes at Reckitt
Automating Data Quality Processes at ReckittAutomating Data Quality Processes at Reckitt
Automating Data Quality Processes at ReckittDatabricks
 

What's hot (20)

Azure Stream Analytics
Azure Stream AnalyticsAzure Stream Analytics
Azure Stream Analytics
 
A developer's introduction to big data processing with Azure Databricks
A developer's introduction to big data processing with Azure DatabricksA developer's introduction to big data processing with Azure Databricks
A developer's introduction to big data processing with Azure Databricks
 
Building big data solutions on azure
Building big data solutions on azureBuilding big data solutions on azure
Building big data solutions on azure
 
Wrangling data like a boss
Wrangling data like a bossWrangling data like a boss
Wrangling data like a boss
 
Top 5 Things to Know About Integrating MongoDB into Your Data Warehouse
Top 5 Things to Know About Integrating MongoDB into Your Data WarehouseTop 5 Things to Know About Integrating MongoDB into Your Data Warehouse
Top 5 Things to Know About Integrating MongoDB into Your Data Warehouse
 
Introducing Databricks Delta
Introducing Databricks DeltaIntroducing Databricks Delta
Introducing Databricks Delta
 
Big data on Azure for Architects
Big data on Azure for ArchitectsBig data on Azure for Architects
Big data on Azure for Architects
 
10 Big Data Technologies you Didn't Know About
10 Big Data Technologies you Didn't Know About 10 Big Data Technologies you Didn't Know About
10 Big Data Technologies you Didn't Know About
 
Verizon Centralizes Data into a Data Lake in Real Time for Analytics
Verizon Centralizes Data into a Data Lake in Real Time for AnalyticsVerizon Centralizes Data into a Data Lake in Real Time for Analytics
Verizon Centralizes Data into a Data Lake in Real Time for Analytics
 
Cortana Analytics Workshop: Operationalizing Your End-to-End Analytics Solution
Cortana Analytics Workshop: Operationalizing Your End-to-End Analytics SolutionCortana Analytics Workshop: Operationalizing Your End-to-End Analytics Solution
Cortana Analytics Workshop: Operationalizing Your End-to-End Analytics Solution
 
Best Practices: Hadoop migration to Azure HDInsight
Best Practices: Hadoop migration to Azure HDInsightBest Practices: Hadoop migration to Azure HDInsight
Best Practices: Hadoop migration to Azure HDInsight
 
Personalization Journey: From Single Node to Cloud Streaming
Personalization Journey: From Single Node to Cloud StreamingPersonalization Journey: From Single Node to Cloud Streaming
Personalization Journey: From Single Node to Cloud Streaming
 
Integration Monday - Analysing StackExchange data with Azure Data Lake
Integration Monday - Analysing StackExchange data with Azure Data LakeIntegration Monday - Analysing StackExchange data with Azure Data Lake
Integration Monday - Analysing StackExchange data with Azure Data Lake
 
Encryption and Masking for Sensitive Apache Spark Analytics Addressing CCPA a...
Encryption and Masking for Sensitive Apache Spark Analytics Addressing CCPA a...Encryption and Masking for Sensitive Apache Spark Analytics Addressing CCPA a...
Encryption and Masking for Sensitive Apache Spark Analytics Addressing CCPA a...
 
Calum McCrea, Software Engineer at Kx Systems, "Kx: How Wall Street Tech can ...
Calum McCrea, Software Engineer at Kx Systems, "Kx: How Wall Street Tech can ...Calum McCrea, Software Engineer at Kx Systems, "Kx: How Wall Street Tech can ...
Calum McCrea, Software Engineer at Kx Systems, "Kx: How Wall Street Tech can ...
 
Entity Resolution Service - Bringing Petabytes of Data Online for Instant Access
Entity Resolution Service - Bringing Petabytes of Data Online for Instant AccessEntity Resolution Service - Bringing Petabytes of Data Online for Instant Access
Entity Resolution Service - Bringing Petabytes of Data Online for Instant Access
 
Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardDelta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
 
WhereHows: Taming Metadata for 150K Datasets Over 9 Data Platforms
WhereHows: Taming Metadata for 150K Datasets Over 9 Data PlatformsWhereHows: Taming Metadata for 150K Datasets Over 9 Data Platforms
WhereHows: Taming Metadata for 150K Datasets Over 9 Data Platforms
 
Towards Digital Twin standards following an open source approach
Towards Digital Twin standards following an open source approachTowards Digital Twin standards following an open source approach
Towards Digital Twin standards following an open source approach
 
Automating Data Quality Processes at Reckitt
Automating Data Quality Processes at ReckittAutomating Data Quality Processes at Reckitt
Automating Data Quality Processes at Reckitt
 

Viewers also liked

NoSQL with Microsoft Azure
NoSQL with Microsoft AzureNoSQL with Microsoft Azure
NoSQL with Microsoft AzureKhalid Salama
 
Bancos NoSQL no Microsoft Azure
Bancos NoSQL no Microsoft AzureBancos NoSQL no Microsoft Azure
Bancos NoSQL no Microsoft AzureJoel Rodrigues
 
Azure doc db (slideshare)
Azure doc db (slideshare)Azure doc db (slideshare)
Azure doc db (slideshare)David Green
 
Azure DocumentDB for Healthcare Integration - Part 2
Azure DocumentDB for Healthcare Integration - Part 2Azure DocumentDB for Healthcare Integration - Part 2
Azure DocumentDB for Healthcare Integration - Part 2BizTalk360
 
SQL Server vs. Azure DocumentDB – Ein Battle zwischen XML und JSON
SQL Server vs. Azure DocumentDB – Ein Battle zwischen XML und JSONSQL Server vs. Azure DocumentDB – Ein Battle zwischen XML und JSON
SQL Server vs. Azure DocumentDB – Ein Battle zwischen XML und JSONSascha Dittmann
 
SQL Saturday #313 Rheinland - MapReduce in der Praxis
SQL Saturday #313 Rheinland - MapReduce in der PraxisSQL Saturday #313 Rheinland - MapReduce in der Praxis
SQL Saturday #313 Rheinland - MapReduce in der PraxisSascha Dittmann
 
Enterprise Cloud Data Platforms - with Microsoft Azure
Enterprise Cloud Data Platforms - with Microsoft AzureEnterprise Cloud Data Platforms - with Microsoft Azure
Enterprise Cloud Data Platforms - with Microsoft AzureKhalid Salama
 
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...NoSQLmatters
 
Building the Data Lake with Azure Data Factory and Data Lake Analytics
Building the Data Lake with Azure Data Factory and Data Lake AnalyticsBuilding the Data Lake with Azure Data Factory and Data Lake Analytics
Building the Data Lake with Azure Data Factory and Data Lake AnalyticsKhalid Salama
 

Viewers also liked (12)

NoSQL with Microsoft Azure
NoSQL with Microsoft AzureNoSQL with Microsoft Azure
NoSQL with Microsoft Azure
 
Bancos NoSQL no Microsoft Azure
Bancos NoSQL no Microsoft AzureBancos NoSQL no Microsoft Azure
Bancos NoSQL no Microsoft Azure
 
Azure doc db (slideshare)
Azure doc db (slideshare)Azure doc db (slideshare)
Azure doc db (slideshare)
 
Azure DocumentDB for Healthcare Integration - Part 2
Azure DocumentDB for Healthcare Integration - Part 2Azure DocumentDB for Healthcare Integration - Part 2
Azure DocumentDB for Healthcare Integration - Part 2
 
SQL Server vs. Azure DocumentDB – Ein Battle zwischen XML und JSON
SQL Server vs. Azure DocumentDB – Ein Battle zwischen XML und JSONSQL Server vs. Azure DocumentDB – Ein Battle zwischen XML und JSON
SQL Server vs. Azure DocumentDB – Ein Battle zwischen XML und JSON
 
Azure DocumentDB
Azure DocumentDBAzure DocumentDB
Azure DocumentDB
 
Azure DocumentDb
Azure DocumentDbAzure DocumentDb
Azure DocumentDb
 
SQL Saturday #313 Rheinland - MapReduce in der Praxis
SQL Saturday #313 Rheinland - MapReduce in der PraxisSQL Saturday #313 Rheinland - MapReduce in der Praxis
SQL Saturday #313 Rheinland - MapReduce in der Praxis
 
Enterprise Cloud Data Platforms - with Microsoft Azure
Enterprise Cloud Data Platforms - with Microsoft AzureEnterprise Cloud Data Platforms - with Microsoft Azure
Enterprise Cloud Data Platforms - with Microsoft Azure
 
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
Benjamin Guinebertière - Microsoft Azure: Document DB and other noSQL databas...
 
Big Data Application Architectures - IoT
Big Data Application Architectures - IoTBig Data Application Architectures - IoT
Big Data Application Architectures - IoT
 
Building the Data Lake with Azure Data Factory and Data Lake Analytics
Building the Data Lake with Azure Data Factory and Data Lake AnalyticsBuilding the Data Lake with Azure Data Factory and Data Lake Analytics
Building the Data Lake with Azure Data Factory and Data Lake Analytics
 

Similar to NoSQL, which way to go?

SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsSDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsKorea Sdec
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBSean Laurent
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDBMongoDB
 
Webinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
Webinar: Enterprise Data Management in the Era of MongoDB and Data LakesWebinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
Webinar: Enterprise Data Management in the Era of MongoDB and Data LakesMongoDB
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDBMongoDB
 
Jumpstart: Building Your First MongoDB App
Jumpstart: Building Your First MongoDB AppJumpstart: Building Your First MongoDB App
Jumpstart: Building Your First MongoDB AppMongoDB
 
Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Chris Richardson
 
MongoDB in FS
MongoDB in FSMongoDB in FS
MongoDB in FSMongoDB
 
Agility and Scalability with MongoDB
Agility and Scalability with MongoDBAgility and Scalability with MongoDB
Agility and Scalability with MongoDBMongoDB
 
Compare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBCompare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBAmar Das
 
Dynamo vs Mongo
Dynamo vs MongoDynamo vs Mongo
Dynamo vs MongoAmar Das
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewAntonio Pintus
 
Case study of Rujhaan.com (A social news app )
Case study of Rujhaan.com (A social news app )Case study of Rujhaan.com (A social news app )
Case study of Rujhaan.com (A social news app )Rahul Jain
 
Sharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data LessonsSharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data LessonsGeorge Stathis
 
Introducing MongoDB into your Organization
Introducing MongoDB into your OrganizationIntroducing MongoDB into your Organization
Introducing MongoDB into your OrganizationMongoDB
 

Similar to NoSQL, which way to go? (20)

MongoDB
MongoDBMongoDB
MongoDB
 
SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsSDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and models
 
Drop acid
Drop acidDrop acid
Drop acid
 
Mongodb lab
Mongodb labMongodb lab
Mongodb lab
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
 
Webinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
Webinar: Enterprise Data Management in the Era of MongoDB and Data LakesWebinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
Webinar: Enterprise Data Management in the Era of MongoDB and Data Lakes
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDB
 
Jumpstart: Building Your First MongoDB App
Jumpstart: Building Your First MongoDB AppJumpstart: Building Your First MongoDB App
Jumpstart: Building Your First MongoDB App
 
Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)
 
MongoDB in FS
MongoDB in FSMongoDB in FS
MongoDB in FS
 
Agility and Scalability with MongoDB
Agility and Scalability with MongoDBAgility and Scalability with MongoDB
Agility and Scalability with MongoDB
 
Compare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDBCompare DynamoDB vs. MongoDB
Compare DynamoDB vs. MongoDB
 
Dynamo vs Mongo
Dynamo vs MongoDynamo vs Mongo
Dynamo vs Mongo
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overview
 
Case study of Rujhaan.com (A social news app )
Case study of Rujhaan.com (A social news app )Case study of Rujhaan.com (A social news app )
Case study of Rujhaan.com (A social news app )
 
Sharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data LessonsSharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data Lessons
 
Introducing MongoDB into your Organization
Introducing MongoDB into your OrganizationIntroducing MongoDB into your Organization
Introducing MongoDB into your Organization
 

More from Ahmed Elharouny

Deep dive into azure durable functions
Deep dive into azure durable functionsDeep dive into azure durable functions
Deep dive into azure durable functionsAhmed Elharouny
 
Applying microservices principles to front end
Applying microservices principles to front endApplying microservices principles to front end
Applying microservices principles to front endAhmed Elharouny
 
Introduction to require js
Introduction to require jsIntroduction to require js
Introduction to require jsAhmed Elharouny
 
Building share point apps with angularjs
Building share point apps with angularjsBuilding share point apps with angularjs
Building share point apps with angularjsAhmed Elharouny
 
Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJsAhmed Elharouny
 

More from Ahmed Elharouny (8)

Deep dive into azure durable functions
Deep dive into azure durable functionsDeep dive into azure durable functions
Deep dive into azure durable functions
 
Applying microservices principles to front end
Applying microservices principles to front endApplying microservices principles to front end
Applying microservices principles to front end
 
Introduction to require js
Introduction to require jsIntroduction to require js
Introduction to require js
 
Building share point apps with angularjs
Building share point apps with angularjsBuilding share point apps with angularjs
Building share point apps with angularjs
 
Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
 
Advanced Jquery
Advanced JqueryAdvanced Jquery
Advanced Jquery
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
 
Design patterns
Design patternsDesign patterns
Design patterns
 

Recently uploaded

NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)Basil Achie
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...NETWAYS
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024eCommerce Institute
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Salam Al-Karadaghi
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringSebastiano Panichella
 
LANDMARKS AND MONUMENTS IN NIGERIA.pptx
LANDMARKS  AND MONUMENTS IN NIGERIA.pptxLANDMARKS  AND MONUMENTS IN NIGERIA.pptx
LANDMARKS AND MONUMENTS IN NIGERIA.pptxBasil Achie
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AITatiana Gurgel
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
SBFT Tool Competition 2024 - CPS-UAV Test Case Generation Track
SBFT Tool Competition 2024 - CPS-UAV Test Case Generation TrackSBFT Tool Competition 2024 - CPS-UAV Test Case Generation Track
SBFT Tool Competition 2024 - CPS-UAV Test Case Generation TrackSebastiano Panichella
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Kayode Fayemi
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )Pooja Nehwal
 
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...NETWAYS
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSebastiano Panichella
 
Motivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfMotivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfakankshagupta7348026
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@vikas rana
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfhenrik385807
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Delhi Call girls
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...henrik385807
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfhenrik385807
 

Recently uploaded (20)

NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software Engineering
 
LANDMARKS AND MONUMENTS IN NIGERIA.pptx
LANDMARKS  AND MONUMENTS IN NIGERIA.pptxLANDMARKS  AND MONUMENTS IN NIGERIA.pptx
LANDMARKS AND MONUMENTS IN NIGERIA.pptx
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
 
SBFT Tool Competition 2024 - CPS-UAV Test Case Generation Track
SBFT Tool Competition 2024 - CPS-UAV Test Case Generation TrackSBFT Tool Competition 2024 - CPS-UAV Test Case Generation Track
SBFT Tool Competition 2024 - CPS-UAV Test Case Generation Track
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
WhatsApp 📞 9892124323 ✅Call Girls In Juhu ( Mumbai )
 
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
OSCamp Kubernetes 2024 | A Tester's Guide to CI_CD as an Automated Quality Co...
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation Track
 
Motivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdfMotivation and Theory Maslow and Murray pdf
Motivation and Theory Maslow and Murray pdf
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
 

NoSQL, which way to go?

  • 1. NoSQL: Which way to go? DDDMelbourne2015 HimanshuDesai,AhmedElharouny&DanielJanczak
  • 2.
  • 3. About us • Himanshu Desai (@H_Desai) • Ahmed Elharouny(@Harouny) • Daniel Janczak (@DanielJanczak) And we all work for Readify
  • 4. Page Why NoSQL? Scale Pros NoSQL technologies can offer more scalability than relational databases Cons Often lose some benefits of relational databases e.g. database-wide transactions Better Formats Pros Avoiding ORMs Cons Limited BI tooling, Data hard to share outside the application Work in more flexible ways Pros No fixed schemas Cons Fixed schemas help prevent errors
  • 5. Page Document Database Database CollectionsCollections Database { “title”: “Justin …”, “genre”: “Pop”, “price”: 36 } Document 1 { “title”: “Don’t Spe..”, “genre”: “Techno”, “price”: 42.99 } Document 2 { “numberOfSongs”: 2, “last”: “Jan 1, 2015” } Document 3 Request Application { }
  • 7. What is RavenDB? › Open source NoSQL database for .NET › Developed by Hibernating Rhinos Ltd › Available › As a standalone package › As embedded version › On Azure and Amazon
  • 8. Schema-free Store data as Plain Old C# Object (POCO) Or directly as JSON var author = new Author { Name = "George Martin", Books = new[] { new Book {Title = "A Game of Thrones"}, new Book {Title = "A Clash of Kings"} } }; session.Store(author); { "Name": "George Martin", "Books": [ { "Title": "A Game of Thrones", "Genre": "Fantasy" }, { "Title": "A Clash of Kings", "Genre": "Fantasy } ] }
  • 9. Scalable › Replication › “Keepcopiesofmydatasomewhereelse” › Sharding › “Splitmyhugedatabaseintosmallerparts” › Multi-tenancy › “Singleinstanceservesmultiplecustomers=manydatabasesper server”
  • 10. Extensible › Useexisting bundles › Compression › Encryption › Expiration › PeriodicExport › Quotas › Replication › ScriptedIndex › SQLReplication › Versioning › Orwriteyour ownplugins › Triggers › Codecs › Tasks › Compilation Extensions › AnalyzerGenerators › Databaseconfiguration › Customsorters
  • 11. Easy to use › .NETandJAVAclient › LINQtoquerydata › RESTAPI › GEThttp://localhost:8080/docs/bobs_address › PUThttp://localhost:8080/docs/bobs_address -d"{FirstName:'Bob', LastName:'Smith',Address:'5ElmSt'}“ › Andsoon…
  • 12. Easy to manage › .Built-inmanagementtool–noneedtodownloadanythingextra
  • 13. Optimized › Transactional(ACID)ondocumentoperations › InplainEnglish“yourdataissafe” › ButonlyBASEforqueries › “BasicallyAvailable,Softstate,EventualConsistency” › InplainEnglish: › youwillalwaysgettheresultsofyourqueriesasfastaspossible › buttheresultswon’talwaysbeuptodateuntildatabasefinishes indexing › Ifyouwantthemuptodate,youhavetodemanditexplicitly
  • 14. Eventual consistency Good or bad ? Newspaper Good! Very few writes, thousands of reads, doesn’t have to be immediate Product signup Good! All applicant information held together Banking system What if the credits and debits sometimes don’t match? Patient drug monitoring What if the drug doses are not updated on time?
  • 15. Our test data public class Author { public string Name {get; set;} public string Surname {get; set;} public Book[] Books {get; set;} } public class Book { public string Title {get; set;} public string Genre {get; set;} public DateTime? PublishedOn {get; set;} public decimal? Price {get; set;} }
  • 16. Our test data continues… • George Martin • A Game of Thrones, Fantasy, 6/8/1996, $12.34 • A Clash of Kings, Fantasy, 16/11/1998 • Dan Simmons • Hyperion, Science Fiction, 1/1/1989, $34.56 • Terror, Thriller, 8/1/2007, $23.45 • John Tolkien • Hobbit, Fantasy, 21/9/1937, $12.34 • Stephen King • The Stand, Horror, 1/9/1978, $12.34
  • 17. A quick look at code Code samples: https://github.com/danieljanczak/ddd-melb2015-ravendb-samples
  • 19. A scalable, high-performance, open source, schema-free, document- oriented database. - mongodb.org What is MongoDB?
  • 21. MongoDBFeatures The best features of key/values stores, document databases and relational databases in one. • Open source
  • 22. MongoDB Features The best features of key/values stores, document databases and relational databases in one. • Open source • Cross platform
  • 23. The best features of key/values stores, document databases and relational databases in one. MongoDB Features • Open source • Cross platform • Strong indexing
  • 24. The best features of key/values stores, document databases and relational databases in one. MongoDB Features • Open source • Cross platform • Strong indexing • Strong query language
  • 25. The best features of key/values stores, document databases and relational databases in one. MongoDB Features • Open source • Cross platform • Strong indexing • Strong query language • Replication
  • 26. The best features of key/values stores, document databases and relational databases in one. MongoDB Features • Open source • Cross platform • Strong indexing • Strong query language • Replication • Sharding
  • 27. The best features of key/values stores, document databases and relational databases in one. MongoDB Features • Open source • Cross platform • Strong indexing • Strong query language • Replication • Sharding • Native drivers
  • 28. The best features of key/values stores, document databases and relational databases in one. MongoDB Features • Open source • Cross platform • Strong indexing • Strong query language • Replication • Sharding • Native drivers • File storage (GridFS)
  • 29. The best features of key/values stores, document databases and relational databases in one. MongoDB Features • Open source • Cross platform • Strong indexing • Strong query language • Replication • Sharding • Native drivers • File storage (GridFS) • Aggregation framework + MapReduce
  • 30. MongoDB Getting Started 1 DOWNLOAD MongoDB 64 Bit for Windows (Link) 2 Create Data Directory 3 Start MongoDB
  • 33. How would you access it? Application Database Collections Stored Procedures Triggers UDFs Documents Libraries: .NET, JavaScript, Node.js, Python, … REST Collections Database
  • 34. DocumentDB Working with data RESTful access methods For Create/Read/Update/Delete (CRUD) operations DocumentDB SQL A query language with SQL- derived syntax Example: SELECT c.Books FROM Authors c WHERE c.name = “George" Executing logic in the DB ( Javascript) Stored procedures Triggers User-defined functions (UDFs) - Allow extending DocumentDB SQL
  • 35. Sharding and Transaction Collection Collection Collection Database JSON JSON JSON JSON JSON JSON JSON JSON Collection JSON JSON JSON The unit of Sharding is a collection is a collection Atomic transactions can span only a single collection collection
  • 36. .NET Development • You need following from the portal after provision a database • Endpoint Url • Authorization key • Nu-get package • Install-Package Microsoft.Azure.DocumentDB • Use them to create DocumentClient
  • 37. Demo
  • 39. In a nutshell - ACID • RavenDB • Fully transactional writes on document level, even between collections • Reads use eventual consistency • Support for DTS • MongoDB • Only supports ACID transactions at the document level. • Multi-collection (table) transactions not supported. • Users can choose the level of consistency using (WriteConcern and ReadPreference) • DocumentDB • Full ACID support on the collection level • 4 levels of consistency, Extremely rich query model.
  • 40. In a nutshell - availability and tooling • RavenDB • On-prem (Windows), Cloud (RavenHQ) on Azure and Amazon, Embedded version / unit testing • Built in web based Management Studio • .NET and JAVA drivers, REST API • Possible access through LinqPad • MongoDB • On-prem (Windows, Linx, Mac), Cloud (i.e MongoLab) • MongoDB Cloud Manager (monitoring, automated management) • Mongo Shell • Lots of 3rd party GUIs i.e. Robomongo • DocumentDB • Accessed from virtually “any” system. Available in “Azure” only at this point. • Azure Web Portal • DocumentDB Studio • LinqPad • SDK available for various platform and REST based access
  • 41. In a nutshell – querying and indexing • RavenDB • Only very basic queries supported without static indexes • Map-reduce • Full text search • Eventual consistency by default • MongoDB • Strong indexing (_id indexed by default, custom indexes, compound, unique, text). Async indexing. • Query from primary by default (Strong consistency) • Query from “nearest” if needed (Eventual consistency) • When writing you choose when to consider write operation successful. • DocumentDB • Very rich query model – Supports Linq to objects, Lambda expression and SQL style syntax. Supports Stored procedure, triggers and UDFs • Auto index by default. • Support lazy indexing if required. • 4 levels of consistency to choose from (Strong, Session, Bounded Stalesness,Eventual consistency
  • 42. In a nutshell - performance • RavenDB • Writes directly to disk (safety over speed) • Indexing in the background • Query results are instantly available in indexes • May need to wait for specific update • MongoDB • TCP/IP based communication. • Uses BSON (lightweight, traversable, efficient). • MMAPv1 storage engine uses OS memory mapped files. • Wiredtiger storage engine (7,000,000 op/second 28 threads). • Choose level of performance vs consistency. • DocumentDB • 3 Levels of performance offered. • Normalised CPU, memory, Disk and network as Request Units (RU) • TCP/HTTPS based access available
  • 43. In a nutshell – gotchas! • RavenDB • Need to reset underlying Lucene indexes – they do crash • Database defaults (winning numbers: 15, 50, 16384; 128, 1024) • Static indexes • Eventual consistency • MongoDB • 32-bit limitations • Max document size 16 MB • Modeling currency • DocumentDB • Max response size : 1MB • Max request size including attachment: 512KB. • Consistency is set at database level not at collection level.