SlideShare a Scribd company logo
Introducing
RavenDB
Agile Persistence in .Net
About Johnny Graber
•Software Engineer - Swiss Medical Association
•Twitter: @j_graber
•E-Mail: JG@JGraber.ch
•Blog: ImproveAndRepeat.com Examples at
Einführung in RavenDB
Today’s Main Topics
•NoSQL
•RavenDB
•Agile Persistence
Demo RavenDB .Net Client
How simple is it to access RavenDB?
NoSQL?
No SQL
Not only SQL
Polyglot Persistence
Relational Databases aren’t
Obsolete
Great for
•Optimized Writes
•Minimal Storage Footprint
•Flexible Querying
But
•Mostly Reads in Our Applications
•Storage Costs (Almost) Nothing
•Hard to Scale
NoSQL Provides Solutions
Main Types of NoSQL
•Key / Value Store
•Graph Database
•Column Database
•Document Store
Einführung in RavenDB
RavenDB
•2nd Generation Document Database
•Built on .Net
•Schema Free
Some RavenDB Features
•Safe by Default
•Supports Transactions (ACID)
•Best Practices Built in
A Document in RavenDB
•Self-Contained
•Independent
•Redundant Data (History)
A Document in RavenDB
Running RavenDB
•Standalone Server
•Part of Your Web-Application
•Embedded Mode
Installing RavenDB
RavenDB Studio
•Look Into the Database
•Generate Sample Data
•Administration Tools
Demo RavenDB Studio
How does the administration interface works?
Connect to RavenDB
•.Net Client
Install-Package RavenDB.Client
•HTTP API
Demo HTTP API
Can you use RavenDB without .Net?
Querying RavenDB
var books = from books in session.Query<Book>()
where books.Title.StartsWith("Raven")
select books;
var book = session.Load<Book>("books/1");
Indexes in RavenDB
•All Queries Need an Index
•Static or Dynamic
•Created in Background (Stale Index)
Challenges for Index Creation
•Schema Free Data
•Fixed Structure to Find Data
•Closing the Gap with Map/Reduce
Map/Reduce
This is probably the most
common error that
people make with any
sort of data access
technology. "Just give me
the whole thing, I'll make
sense of it on the client
side." In the RDBMS
world, this would be
expressed as "SELECT *
FROM Orders".
The problem with such
queries is they can
potentially…
Map
Reduce
Demo Index Creation
How hard can it be?
Licencing RavenDB
•AGPL for Open Source Projects
•Commercial Licence: 399$/Year/Instance
•RavenHQ: Starting at 10$/Month
Agile Persistence
Development Today
•Agile Approach
•Embrace Change
•Fail Fast
Except in the Persistence Layer
•First Time Right
•Hard to Change
•Don’t Touch
“When the Database must be
correct the first time, every part of
the application must be known at
the beginning”
“Persistence should be
an application detail”
Domain-Driven Design
•Aggregates
•Bounded Context
•Entity or Value Object
Benefits of Following DDD Principles
•History of Documents
•Complete Change Tracking
•Optimised Data Access
Command Query
Responsibility Segregation (CQRS)
•Commands Modify State
•Queries Answer Questions
•Keep Them Apart
CQRS for Fast Applications
CQRS and RavenDB
•HTTP API (REST )
•When Unauthenticated Only Allow Read
•Done
TDD and RavenDB
•Don’t Abstract an Abstraction Layer!
•Use In-Memory Mode
•It’s Fast Enough
Changing Documents
•Easily Done
•Know the Impacts
•Worst Case: Full DB Update
Demo Schema Change
How can you change your schema?
Use RavenDB
•Hacking
•Pet Projects
•Prototypes
Try This at Home
NOT in Production!
What’s Missing
•Authorisation & Authentication
•Bulk Inserts
•Paging
•Sharding
More on RavenDB
•RavenDB.net
•Tekpub.com
•ImproveAndRepeat.com
More on Polyglot Persistence
•Martin Fowler:
http://martinfowler.com/bliki/CQRS.html
•Jimmy Bogard: Real World Polyglot Persistence
http://vimeo.com/68320412
Questions?
JG@JGraber.ch
Thank You!

More Related Content

PDF
From Rails legacy to DDD - Pivorak, Lviv
PPTX
iForum 2015: SQL vs. NoSQL
PPTX
SQL vs. NoSQL. It's always a hard choice.
PDF
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
PPTX
Building FoundationDB
PDF
CQRS - Eine Einführung - NOUG 2011
PPTX
Azure doc db (slideshare)
PPTX
When to Use MongoDB...and When You Should Not...
From Rails legacy to DDD - Pivorak, Lviv
iForum 2015: SQL vs. NoSQL
SQL vs. NoSQL. It's always a hard choice.
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
Building FoundationDB
CQRS - Eine Einführung - NOUG 2011
Azure doc db (slideshare)
When to Use MongoDB...and When You Should Not...

Similar to Einführung in RavenDB (20)

PPTX
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
PPTX
Lambda architecture: from zero to One
PPTX
SQL To NoSQL - Top 6 Questions Before Making The Move
KEY
Non-Relational Databases at ACCU2011
PDF
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
PDF
Beyond The Rails Way
PPTX
NoSQLDatabases
PPTX
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
PPTX
NoSQL for SQL Server Developers using Couchbase
PDF
Nine Neins - where Java EE will never take you
PPTX
Oracle big data appliance and solutions
PPT
Getting Started with Docker
PPTX
Database Virtualization: The Next Wave of Big Data
PDF
Stay productive_while_slicing_up_the_monolith
PPTX
Navigating NoSQL in cloudy skies
PPTX
KESALAHAN BACAAN AL-QURAN DALAM TILAWAH AL-QURAN DAN KRITERIA EVALUASI
PPTX
AWS for the Java Developer
PPTX
MongoDB
PDF
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
KEY
SSJS, NoSQL, GAE and AppengineJS
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Lambda architecture: from zero to One
SQL To NoSQL - Top 6 Questions Before Making The Move
Non-Relational Databases at ACCU2011
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Beyond The Rails Way
NoSQLDatabases
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
NoSQL for SQL Server Developers using Couchbase
Nine Neins - where Java EE will never take you
Oracle big data appliance and solutions
Getting Started with Docker
Database Virtualization: The Next Wave of Big Data
Stay productive_while_slicing_up_the_monolith
Navigating NoSQL in cloudy skies
KESALAHAN BACAAN AL-QURAN DALAM TILAWAH AL-QURAN DAN KRITERIA EVALUASI
AWS for the Java Developer
MongoDB
Lessons from Building Large-Scale, Multi-Cloud, SaaS Software at Databricks
SSJS, NoSQL, GAE and AppengineJS
Ad

More from NETUserGroupBern (20)

PDF
Large Language Models, Data & APIs - Integrating Generative AI Power into you...
PDF
AAD und .NET
PDF
SHIFT LEFT WITH DEVSECOPS
PDF
Securing .NET Core, ASP.NET Core applications
PDF
Application Security in ASP.NET Core
PDF
Ruby und Rails für .NET Entwickler
PDF
What Doctors Can Teach Us on Continuous Learning
PDF
Entity Framework Core - Der Umstieg auf Core
PDF
Weiches Zeugs für harte Jungs und Mädels
PDF
Änderungen im Cardinality Estimator SQL Server 2014
PPTX
Rest Fundamentals
PDF
Refactoring: Mythen & Fakten
PDF
AngularJs
PDF
Pragmatische Anforderungen
PPTX
Einführung in MongoDB
PDF
What the hell is PowerShell?
PPTX
Know your warm up
PDF
BDD mit Machine.Specifications (MSpec)
PDF
Versionskontrolle mit Git
PDF
.NETworking Workshop Design Thinking
Large Language Models, Data & APIs - Integrating Generative AI Power into you...
AAD und .NET
SHIFT LEFT WITH DEVSECOPS
Securing .NET Core, ASP.NET Core applications
Application Security in ASP.NET Core
Ruby und Rails für .NET Entwickler
What Doctors Can Teach Us on Continuous Learning
Entity Framework Core - Der Umstieg auf Core
Weiches Zeugs für harte Jungs und Mädels
Änderungen im Cardinality Estimator SQL Server 2014
Rest Fundamentals
Refactoring: Mythen & Fakten
AngularJs
Pragmatische Anforderungen
Einführung in MongoDB
What the hell is PowerShell?
Know your warm up
BDD mit Machine.Specifications (MSpec)
Versionskontrolle mit Git
.NETworking Workshop Design Thinking
Ad

Recently uploaded (20)

PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
top salesforce developer skills in 2025.pdf
PPT
Introduction Database Management System for Course Database
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
history of c programming in notes for students .pptx
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Transform Your Business with a Software ERP System
PPTX
Introduction to Artificial Intelligence
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Digital Strategies for Manufacturing Companies
PDF
medical staffing services at VALiNTRY
Upgrade and Innovation Strategies for SAP ERP Customers
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
top salesforce developer skills in 2025.pdf
Introduction Database Management System for Course Database
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
history of c programming in notes for students .pptx
Online Work Permit System for Fast Permit Processing
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Transform Your Business with a Software ERP System
Introduction to Artificial Intelligence
Design an Analysis of Algorithms I-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
Digital Strategies for Manufacturing Companies
medical staffing services at VALiNTRY

Einführung in RavenDB

Editor's Notes

  • #4: Nächste Woche an der SoftShake in Genf, 300 Besucher, Hat noch Tickets Testen der Folien und Beispiele, Feedback sehr willkommen!
  • #5: RavenDB ist ein tolles Produkt. Ohne Wissen über die Problemfelder die zur Entstehung führten kann man nur schwer die Vorteile erkennen. Da ich keine Lizenzen verkaufe möchte ich im 3. Teil vor allem über die dadurch gewonnenen Möglichkeiten sprechen.
  • #6: Da jeder immer nur von einfach spricht schauen wir einmal an wie einfach es wirklich ist
  • #10: Heute Benutzt: Amazon (Relational Produktekatalog, GraphDB für Empfehlungen, usw). Ihr selber: Caching, Sessions, Cookies,
  • #26: Get Resource/Id (Created in .Net) Put Resource/Id + JSON Show in RavenDB Studio
  • #31: Create AllProducts Index Destination Query in HTTP Query in .Net
  • #45: .Net Class Add Field Add Code to Set Field Add New, Update Old DNUG: Speichern ohne Authoren zu speichern, einmal mit, einmal als Wrapper (Ids übernehmen!)