+ All Categories
Home > Documents > NoSQL for you

NoSQL for you

Date post: 15-Apr-2017
Category:
Upload: kevin-krueger
View: 184 times
Download: 1 times
Share this document with a friend
16
NoSQL for you AN INTRODUCTION TO DOCUMENT DATABASES USING RAVENDB NOSQL FOR YOU Kevin Krueger, Principal Consultant [email protected] SolutionWave @kevinkrueger
Transcript
Page 1: NoSQL for you

NOSQL FOR YOU

NoSQL for youAN INTRODUCTION TO DOCUMENT DATABASES USING RAVENDBKevin Krueger, Principal [email protected]

@kevinkrueger

Page 2: NoSQL for you

NOSQL FOR YOU

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”

Page 3: NoSQL for you

NOSQL FOR YOU

Types of NoSQL Databases Key-Value Store (Riak, Amazon Dynamo) Document Database (RavenDB, CouchDB, MongoDB) Graph Database (Neo4j)

Page 4: NoSQL for you

NOSQL FOR YOU

DocumentDB (documents, not rows) Non-relational Schema-less Transactional* REST API and .Net Client

Page 5: NoSQL for you

NOSQL FOR YOU

Why choose a Document Database instead of a Relational Database? 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

Page 6: NoSQL for you

NOSQL FOR YOU

Demos – Basic CRUD operations

Page 7: NoSQL for you

NOSQL FOR YOU

Demo – Basic queries

Page 8: NoSQL for you

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 flyIt’s better to explicitly create them up frontIndexes can be stale (eventual consistency)

Page 9: NoSQL for you

NOSQL FOR YOU

Demo – Static indexes

Page 10: NoSQL for you

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

Page 11: NoSQL for you

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

Page 12: NoSQL for you

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

Page 13: NoSQL for you

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

Page 14: NoSQL for you

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

Page 15: NoSQL for you

NOSQL FOR YOU

Resources RavenDB: http://ravendb.net/ RavenHQ: http://ravenhq.com/ Pluralsight course: Introduction to Raven DB http://www.pluralsight.com/

Page 16: NoSQL for you

NOSQL FOR YOU

Questions?


Recommended