SlideShare a Scribd company logo
1 of 16
NoSQL for you
AN INTRODUCTION TO DOCUMENT DATABASES USING RAVENDB
NOSQL FOR YOU
Kevin Krueger, Principal Consultant kevin@solutionwave.net
SolutionWave @kevinkrueger
What is NoSQL?
“non SQL” or “not-only SQL”
From Wikipedia: “provides a mechanism for storage and
retrieval of data that is modeled in means other than the
tabular relations used in relational databases”
NOSQL FOR YOU
Types of NoSQL Databases
Key-Value Store (Riak, Amazon Dynamo)
Document Database (RavenDB, CouchDB, MongoDB)
Graph Database (Neo4j)
NOSQL FOR YOU
NOSQL FOR YOU
DocumentDB (documents, not rows)
Non-relational
Schema-less
Transactional*
REST API and .Net Client
Why choose a Document Database
instead of a Relational Database?
NOSQL FOR YOU
There is an inherent mismatch between object models and
relational models (aka the ORM impedance mismatch)
◦Set vs. graph relationships
ORMs end up being a leaky abstraction
◦Inefficient SQL (e.g. SELECT N+1 issue)
◦The database schema ends up driving your object model
NOSQL FOR YOU
Demos – Basic CRUD operations
Demo – Basic queries
NOSQL FOR YOU
Indexes
Every query (beyond retrieval by document id) requires an
index
◦Indexes teach Raven about your data
◦Raven uses Lucene.Net behind the scenes for indexing
Raven will automatically create indexes for you on the fly
It’s better to explicitly create them up front
Indexes can be stale (eventual consistency)
NOSQL FOR YOU
Demo – Static indexes
NOSQL FOR YOU
Things to be aware of:
Raven is built with a “safe by default” principle
◦These limits can surprise you
Eventual consistency requires careful consideration
◦Your application’s behavior shouldn’t depend on indexes being
non-stale
NOSQL FOR YOU
Bundles
Bundles are packages of additional functionality that can
optionally be installed. Examples:
◦Authorization
◦Cascade delete
◦Encryption
◦More like this
◦Unique constraints
◦Versioning
NOSQL FOR YOU
Advanced topics for you to explore
Advanced indexes
◦Multi-map indexes
Transformers: server side projections
Listeners: client-side extension points
◦Example types: Store listeners, Conversion listeners
Data subscriptions (pub/sub)
Patching API: useful for updating denormalized data
In-memory mode: great for unit tests
NOSQL FOR YOU
Thoughts on NoSQL
It’s not a one-size fits all solution.
Sometimes NoSQL doesn’t make a lot of sense:
◦ e.g. Ad-hoc reporting
It’s another tool to put in your tool belt. Use it strategically where it
makes sense.
◦ Semi-structured data
◦ Hierarchical data
NOSQL FOR YOU
Summary
Raven is a NoSQL Document Database
Documents are stored in JSON
The .Net API supports queries using Linq
Indexes specify the fields in your documents that can be
searched on
NOSQL FOR YOU
Resources
RavenDB: http://ravendb.net/
RavenHQ: http://ravenhq.com/
Pluralsight course: Introduction to Raven DB
http://www.pluralsight.com/
NOSQL FOR YOU
Questions?
NOSQL FOR YOU

More Related Content

What's hot

Apache Cassandra Lunch #78: Deploy Cassandra using DSE Operator to Kubernetes
Apache Cassandra Lunch #78: Deploy Cassandra using DSE Operator to KubernetesApache Cassandra Lunch #78: Deploy Cassandra using DSE Operator to Kubernetes
Apache Cassandra Lunch #78: Deploy Cassandra using DSE Operator to KubernetesAnant Corporation
 
SQL or NoSQL, is this the question? - George Grammatikos
SQL or NoSQL, is this the question? - George GrammatikosSQL or NoSQL, is this the question? - George Grammatikos
SQL or NoSQL, is this the question? - George GrammatikosGeorge Grammatikos
 
Reporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraReporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraDataStax
 
Migrating from a Relational Database to Cassandra: Why, Where, When and How
Migrating from a Relational Database to Cassandra: Why, Where, When and HowMigrating from a Relational Database to Cassandra: Why, Where, When and How
Migrating from a Relational Database to Cassandra: Why, Where, When and HowAnant Corporation
 
Apache Cassandra Lunch #71: Creating a User Profile Using DataStax Astra and ...
Apache Cassandra Lunch #71: Creating a User Profile Using DataStax Astra and ...Apache Cassandra Lunch #71: Creating a User Profile Using DataStax Astra and ...
Apache Cassandra Lunch #71: Creating a User Profile Using DataStax Astra and ...Anant Corporation
 
Empowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with AlternatorEmpowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with AlternatorScyllaDB
 
Apache Cassandra Lunch #70: Basics of Apache Cassandra
Apache Cassandra Lunch #70: Basics of Apache CassandraApache Cassandra Lunch #70: Basics of Apache Cassandra
Apache Cassandra Lunch #70: Basics of Apache CassandraAnant Corporation
 
Introducing DataStax Enterprise 4.7
Introducing DataStax Enterprise 4.7Introducing DataStax Enterprise 4.7
Introducing DataStax Enterprise 4.7DataStax
 
Sql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSatya Pal
 
Enterprise NoSQL: Silver Bullet or Poison Pill
Enterprise NoSQL: Silver Bullet or Poison PillEnterprise NoSQL: Silver Bullet or Poison Pill
Enterprise NoSQL: Silver Bullet or Poison PillBilly Newport
 
Oracle to Cassandra Core Concepts Guid Part 1: A new hope
Oracle to Cassandra Core Concepts Guid Part 1: A new hopeOracle to Cassandra Core Concepts Guid Part 1: A new hope
Oracle to Cassandra Core Concepts Guid Part 1: A new hopeDataStax
 
Overview of DataStax OpsCenter
Overview of DataStax OpsCenterOverview of DataStax OpsCenter
Overview of DataStax OpsCenterDataStax
 
Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)
Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)
Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)Ontico
 
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...ScyllaDB
 
HPCC Systems Engineering Summit Presentation - Leveraging HPCC Systems with V...
HPCC Systems Engineering Summit Presentation - Leveraging HPCC Systems with V...HPCC Systems Engineering Summit Presentation - Leveraging HPCC Systems with V...
HPCC Systems Engineering Summit Presentation - Leveraging HPCC Systems with V...HPCC Systems
 

What's hot (20)

Apache Cassandra Lunch #78: Deploy Cassandra using DSE Operator to Kubernetes
Apache Cassandra Lunch #78: Deploy Cassandra using DSE Operator to KubernetesApache Cassandra Lunch #78: Deploy Cassandra using DSE Operator to Kubernetes
Apache Cassandra Lunch #78: Deploy Cassandra using DSE Operator to Kubernetes
 
SQL or NoSQL, is this the question? - George Grammatikos
SQL or NoSQL, is this the question? - George GrammatikosSQL or NoSQL, is this the question? - George Grammatikos
SQL or NoSQL, is this the question? - George Grammatikos
 
Reporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraReporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & Cassandra
 
Migrating from a Relational Database to Cassandra: Why, Where, When and How
Migrating from a Relational Database to Cassandra: Why, Where, When and HowMigrating from a Relational Database to Cassandra: Why, Where, When and How
Migrating from a Relational Database to Cassandra: Why, Where, When and How
 
No sql databases
No sql databasesNo sql databases
No sql databases
 
Apache Cassandra Lunch #71: Creating a User Profile Using DataStax Astra and ...
Apache Cassandra Lunch #71: Creating a User Profile Using DataStax Astra and ...Apache Cassandra Lunch #71: Creating a User Profile Using DataStax Astra and ...
Apache Cassandra Lunch #71: Creating a User Profile Using DataStax Astra and ...
 
Empowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with AlternatorEmpowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with Alternator
 
No SQL
No SQLNo SQL
No SQL
 
Apache Cassandra Lunch #70: Basics of Apache Cassandra
Apache Cassandra Lunch #70: Basics of Apache CassandraApache Cassandra Lunch #70: Basics of Apache Cassandra
Apache Cassandra Lunch #70: Basics of Apache Cassandra
 
Introducing DataStax Enterprise 4.7
Introducing DataStax Enterprise 4.7Introducing DataStax Enterprise 4.7
Introducing DataStax Enterprise 4.7
 
SQL vs. NoSQL
SQL vs. NoSQLSQL vs. NoSQL
SQL vs. NoSQL
 
Sql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explained
 
Enterprise NoSQL: Silver Bullet or Poison Pill
Enterprise NoSQL: Silver Bullet or Poison PillEnterprise NoSQL: Silver Bullet or Poison Pill
Enterprise NoSQL: Silver Bullet or Poison Pill
 
Oracle to Cassandra Core Concepts Guid Part 1: A new hope
Oracle to Cassandra Core Concepts Guid Part 1: A new hopeOracle to Cassandra Core Concepts Guid Part 1: A new hope
Oracle to Cassandra Core Concepts Guid Part 1: A new hope
 
Overview of DataStax OpsCenter
Overview of DataStax OpsCenterOverview of DataStax OpsCenter
Overview of DataStax OpsCenter
 
Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)
Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)
Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)
 
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
How to Secure Your Scylla Deployment: Authorization, Encryption, LDAP Authent...
 
HPCC Systems Engineering Summit Presentation - Leveraging HPCC Systems with V...
HPCC Systems Engineering Summit Presentation - Leveraging HPCC Systems with V...HPCC Systems Engineering Summit Presentation - Leveraging HPCC Systems with V...
HPCC Systems Engineering Summit Presentation - Leveraging HPCC Systems with V...
 
No sql
No sqlNo sql
No sql
 
Cassandra
CassandraCassandra
Cassandra
 

Similar to NoSQL for you

Sql vs NoSQL-Presentation
 Sql vs NoSQL-Presentation Sql vs NoSQL-Presentation
Sql vs NoSQL-PresentationShubham Tomar
 
Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?Ahmed Rashwan
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQLbalwinders
 
1. introduction to no sql
1. introduction to no sql1. introduction to no sql
1. introduction to no sqlAnuja Gunale
 
NoSQL, no SQL injections?
NoSQL, no SQL injections?NoSQL, no SQL injections?
NoSQL, no SQL injections?Wayne Huang
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Managementsameerfaizan
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMohan Rathour
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introductionPooyan Mehrparvar
 
Vskills Apache Cassandra sample material
Vskills Apache Cassandra sample materialVskills Apache Cassandra sample material
Vskills Apache Cassandra sample materialVskills
 
NoSQL Intro with cassandra
NoSQL Intro with cassandraNoSQL Intro with cassandra
NoSQL Intro with cassandraBrian Enochson
 
Unit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxUnit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxvvpadhu
 

Similar to NoSQL for you (20)

Know what is NOSQL
Know what is NOSQL Know what is NOSQL
Know what is NOSQL
 
Sql vs NoSQL-Presentation
 Sql vs NoSQL-Presentation Sql vs NoSQL-Presentation
Sql vs NoSQL-Presentation
 
NoSQL Seminer
NoSQL SeminerNoSQL Seminer
NoSQL Seminer
 
Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?Why no sql ? Why Couchbase ?
Why no sql ? Why Couchbase ?
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
NoSQL
NoSQLNoSQL
NoSQL
 
Couchbase
CouchbaseCouchbase
Couchbase
 
the rising no sql technology
the rising no sql technologythe rising no sql technology
the rising no sql technology
 
unit2-ppt1.pptx
unit2-ppt1.pptxunit2-ppt1.pptx
unit2-ppt1.pptx
 
NoSQL Basics and MongDB
NoSQL Basics and  MongDBNoSQL Basics and  MongDB
NoSQL Basics and MongDB
 
1. introduction to no sql
1. introduction to no sql1. introduction to no sql
1. introduction to no sql
 
Nosql seminar
Nosql seminarNosql seminar
Nosql seminar
 
NoSQL, no SQL injections?
NoSQL, no SQL injections?NoSQL, no SQL injections?
NoSQL, no SQL injections?
 
Nosql
NosqlNosql
Nosql
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
 
NoSQL databases - An introduction
NoSQL databases - An introductionNoSQL databases - An introduction
NoSQL databases - An introduction
 
Vskills Apache Cassandra sample material
Vskills Apache Cassandra sample materialVskills Apache Cassandra sample material
Vskills Apache Cassandra sample material
 
NoSQL Intro with cassandra
NoSQL Intro with cassandraNoSQL Intro with cassandra
NoSQL Intro with cassandra
 
Unit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxUnit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docx
 

NoSQL for you

  • 1. NoSQL for you AN INTRODUCTION TO DOCUMENT DATABASES USING RAVENDB NOSQL FOR YOU Kevin Krueger, Principal Consultant kevin@solutionwave.net SolutionWave @kevinkrueger
  • 2. What is NoSQL? “non SQL” or “not-only SQL” From Wikipedia: “provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases” NOSQL FOR YOU
  • 3. Types of NoSQL Databases Key-Value Store (Riak, Amazon Dynamo) Document Database (RavenDB, CouchDB, MongoDB) Graph Database (Neo4j) NOSQL FOR YOU
  • 4. NOSQL FOR YOU DocumentDB (documents, not rows) Non-relational Schema-less Transactional* REST API and .Net Client
  • 5. Why choose a Document Database instead of a Relational Database? NOSQL FOR YOU There is an inherent mismatch between object models and relational models (aka the ORM impedance mismatch) ◦Set vs. graph relationships ORMs end up being a leaky abstraction ◦Inefficient SQL (e.g. SELECT N+1 issue) ◦The database schema ends up driving your object model
  • 6. NOSQL FOR YOU Demos – Basic CRUD operations
  • 7. Demo – Basic queries NOSQL FOR YOU
  • 8. Indexes Every query (beyond retrieval by document id) requires an index ◦Indexes teach Raven about your data ◦Raven uses Lucene.Net behind the scenes for indexing Raven will automatically create indexes for you on the fly It’s better to explicitly create them up front Indexes can be stale (eventual consistency) NOSQL FOR YOU
  • 9. Demo – Static indexes NOSQL FOR YOU
  • 10. Things to be aware of: Raven is built with a “safe by default” principle ◦These limits can surprise you Eventual consistency requires careful consideration ◦Your application’s behavior shouldn’t depend on indexes being non-stale NOSQL FOR YOU
  • 11. Bundles Bundles are packages of additional functionality that can optionally be installed. Examples: ◦Authorization ◦Cascade delete ◦Encryption ◦More like this ◦Unique constraints ◦Versioning NOSQL FOR YOU
  • 12. Advanced topics for you to explore Advanced indexes ◦Multi-map indexes Transformers: server side projections Listeners: client-side extension points ◦Example types: Store listeners, Conversion listeners Data subscriptions (pub/sub) Patching API: useful for updating denormalized data In-memory mode: great for unit tests NOSQL FOR YOU
  • 13. Thoughts on NoSQL It’s not a one-size fits all solution. Sometimes NoSQL doesn’t make a lot of sense: ◦ e.g. Ad-hoc reporting It’s another tool to put in your tool belt. Use it strategically where it makes sense. ◦ Semi-structured data ◦ Hierarchical data NOSQL FOR YOU
  • 14. Summary Raven is a NoSQL Document Database Documents are stored in JSON The .Net API supports queries using Linq Indexes specify the fields in your documents that can be searched on NOSQL FOR YOU
  • 15. Resources RavenDB: http://ravendb.net/ RavenHQ: http://ravenhq.com/ Pluralsight course: Introduction to Raven DB http://www.pluralsight.com/ NOSQL FOR YOU

Editor's Notes

  1. Indexes are not consistent in a transaction. They are eventually consistent
  2. Document databases remove this impedance mismatch
  3. Show the Raven install and how you start it up
  4. After demo, show how automatic indexes were created
  5. TIME PERMITTING Remember: there are no relationships in a document databases This requires a change in thinking from relational databases Without this denormalization, you’d have to load the entire customer document to get the customer details you want to display Aggregate roots in DDD
  6. Examples: You can only retrieve 128 documents at a time There is a limit of 30 requests per session