SlideShare a Scribd company logo
1 of 32
RavenDB lovin’
  .NET does NoSQL
about:author
Longtime user of ORMs

Experienced in object DBs

Raven in personal projects

Raven at 3M

Raven with Ayende!
RavenDB?
SQL: Databases done right.
       Circa 1970.
SQL: Databases done right.
       Circa 1970.




   CAP Theorem for distributed systems:
 Consistency, Availability, Partition tolerance
                 Choose 2.
SQL: Databases done right.
       Circa 1970.
SQL: Databases done right.
       Circa 1970.
SQL: Databases done right.
       Circa 1970.

SELECT UPPER(Name)    SELECT UPPER(Name)        SELECT TOP 10 UPPER                     $ SET SOURCEFORMAT “FREE”
FROM Customer         FROM                      (c1.Name)                               IDENTIFICATION DIVISION.
WHERE Name LIKE'A%'   (                         FROM Customer c1                        Display Prompt.
ORDER BY Name             SELECT *,             WHERE c1.Name LIKE 'A%'                    DISPLAY “I <3 SQL!”.
                          RN = row_number()     AND c1.ID NOT IN                           STOP RUN.
                          OVER (ORDER BY        (
                      Name)                        SELECT TOP 20 c2.ID
                          FROM Customer            FROM Customer c2
                          WHERE Name LIKE          WHERE c2.Name LIKE 'A%‘
                      'A%'                         ORDER BY c2.Name
                      ) A                       ) ORDER BY c1.Name
                      WHERE RN BETWEEN 21 AND
                      30
                      ORDER BY Name

                                                   var names = db.Customers
                                                                 .Where(c => c.Name.StartsWith(“A”))
                                                                 .OrderBy(c => c.Name)

    Or how about…                                                .Select(c => c.Name.ToUpper())
                                                                 .Skip(20)
                                                                 .Take(10);
SQL: Because objects and relational
   databases go together like
   peanut butter and tuna fish
SQL + OO =
Peanut butter + Tuna.


 The object-relational impedance mismatch:
   •Polymorphism doesn’t exist in the relational world
   •Encapsulation creates fragile database models
   •Inheritance results in inefficient relational queries
   •Leaky abstraction
SQL + OO =




…but you can mask the tuna only so long…
SQL + OO =
                var today= DateTime.Now;
                context.TheBaseTypes
                  .Where(b => b.DateCreated == today)
                  .ToList();


“Expressing this query in LINQ to Entities is short and sweet. But
don’t be fooled. It’s a hefty request. You’re asking EF and your DB
query each table that maps to the derived entities and join each
one to the BaseTypes table.

In my environment, this creates a 3,200 line SQL query, which can
take Entity Framework some time to build and the database some
time to execute.”

-Julie Lerman, MSDN Magazine, August 2012
ORM: The Vietnam of
 Computer Science
  “ORM is the Vietnam of Computer Science.

  It represents a quagmire which starts well,
  gets more complicated as time passes, and
  before long entraps its users in a
  commitment that has no clear demarcation
  point, no clear win conditions, and no clear
  exit strategy.”

  -Ted Neward
SQL:
The Hammer for every
        nail


 “The first to present his case seems right,
  till another comes forward
  and questions him.”
NoSQL:
A modern alternative to relational
           databases



                     Don’t use T-SQL

                  Typically schema-free

              Built for distributed scalability

                 Relax ACID guarantees
NoSQL:
A modern alternative to relational
           databases



       Trippy things like…

          Cheap, fast reads

        Horizontal scalability

     Flexible, schema-free models
NoSQL has problems,
       too.
NoSQL has problems,
       too.
     Painful query models

      Immature tooling

        Complex APIs

    Poor language support
RavenDB

“I’ve consulted on NHibernate and other
ORMs for over a decade. I’ve seen the same
problems repeated over and over.

I wanted to fix that.
So I created RavenDB.”

-Ayende
RavenDB

       Get out of the RDBMS/ORM mess
          Fix shortcomings of NoSQL

              Evolve data storage
“I intentionally designed RavenDB and its .NET
API to deal with problems and frustrations in the
NHibernate / RDMBS model.”

-Ayende
RavenDB

Setup should be painless
RavenDB

Simple is better
RavenDB

Putting stuff in the database should be easy
RavenDB

Transactions are important
RavenDB

LINQ is the best query language on the planet
RavenDB

Developers should fall into the pit of success
RavenDB

Reads should be *fast*. Index fast.

             Lock-free, non-ACID reads

   “Better stale data quickly than live data slowly.”

     Every read is a query against an index. Yes!

    Indexes should be created
RavenDB

Tooling is important
RavenDB

Search matters. Google-like search.
RavenDB
Scalability should be easy, natural
      Replication: master-to-slave, master-to-master
    Sharding: split your data across servers transparently
Recap!
                         It’s an alternative to the
                         SQL + ORM mess

Raven is scalable!
                         You should totally use it for
                         your next project :-)
Thank You!
Slides: bit.ly/raventalk



                                  Twitter: @JudahGabriel




      Blog: DebuggerDotBreak.wordpress.com

More Related Content

Similar to Raven lovin' - .NET does NoSQL

OrientDB the database for the web 1.1
OrientDB the database for the web 1.1OrientDB the database for the web 1.1
OrientDB the database for the web 1.1Luca Garulli
 
Rafael Bagmanov «Scala in a wild enterprise»
Rafael Bagmanov «Scala in a wild enterprise»Rafael Bagmanov «Scala in a wild enterprise»
Rafael Bagmanov «Scala in a wild enterprise»e-Legion
 
SQL Data Service Overview
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service OverviewEric Nelson
 
Spring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataSpring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataRoger Xia
 
Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009Brian Hogan
 
CouchDB – A Database for the Web
CouchDB – A Database for the WebCouchDB – A Database for the Web
CouchDB – A Database for the WebKarel Minarik
 
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSLRubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSLRuby Bangladesh
 
Introduction to NoSQL Database
Introduction to NoSQL DatabaseIntroduction to NoSQL Database
Introduction to NoSQL DatabaseMohammad Alghanem
 
java database connectivity for java programming
java database connectivity for java programmingjava database connectivity for java programming
java database connectivity for java programmingrinky1234
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyNick Sieger
 
Embrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleEmbrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleSean Cribbs
 
Ruby On Rails Overview
Ruby On Rails OverviewRuby On Rails Overview
Ruby On Rails Overviewjonkinney
 
NoSQL Intro with cassandra
NoSQL Intro with cassandraNoSQL Intro with cassandra
NoSQL Intro with cassandraBrian Enochson
 
Scaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit DublinScaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit DublinAmazon Web Services
 
Scaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit DublinScaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit DublinIan Massingham
 
Dev-In-Town:Linq To Sql by Chan Ming Man
Dev-In-Town:Linq To Sql by Chan Ming ManDev-In-Town:Linq To Sql by Chan Ming Man
Dev-In-Town:Linq To Sql by Chan Ming ManQuek Lilian
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and HowBigBlueHat
 

Similar to Raven lovin' - .NET does NoSQL (20)

OrientDB the database for the web 1.1
OrientDB the database for the web 1.1OrientDB the database for the web 1.1
OrientDB the database for the web 1.1
 
Rafael Bagmanov «Scala in a wild enterprise»
Rafael Bagmanov «Scala in a wild enterprise»Rafael Bagmanov «Scala in a wild enterprise»
Rafael Bagmanov «Scala in a wild enterprise»
 
SQL Data Service Overview
SQL Data Service OverviewSQL Data Service Overview
SQL Data Service Overview
 
Spring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_dataSpring one2gx2010 spring-nonrelational_data
Spring one2gx2010 spring-nonrelational_data
 
Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009
 
CouchDB – A Database for the Web
CouchDB – A Database for the WebCouchDB – A Database for the Web
CouchDB – A Database for the Web
 
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSLRubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
RubyConf Bangladesh 2017 - Craft beautiful code with Ruby DSL
 
Introduction to NoSQL Database
Introduction to NoSQL DatabaseIntroduction to NoSQL Database
Introduction to NoSQL Database
 
java database connectivity for java programming
java database connectivity for java programmingjava database connectivity for java programming
java database connectivity for java programming
 
Connecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRubyConnecting the Worlds of Java and Ruby with JRuby
Connecting the Worlds of Java and Ruby with JRuby
 
How and when to use NoSQL
How and when to use NoSQLHow and when to use NoSQL
How and when to use NoSQL
 
Embrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with RippleEmbrace NoSQL and Eventual Consistency with Ripple
Embrace NoSQL and Eventual Consistency with Ripple
 
Ruby On Rails Overview
Ruby On Rails OverviewRuby On Rails Overview
Ruby On Rails Overview
 
NoSQL Intro with cassandra
NoSQL Intro with cassandraNoSQL Intro with cassandra
NoSQL Intro with cassandra
 
Intro to RavenDB
Intro to RavenDBIntro to RavenDB
Intro to RavenDB
 
Scaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit DublinScaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit Dublin
 
Scaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit DublinScaling on AWS for the First 10 Million Users at Websummit Dublin
Scaling on AWS for the First 10 Million Users at Websummit Dublin
 
NoSql Database
NoSql DatabaseNoSql Database
NoSql Database
 
Dev-In-Town:Linq To Sql by Chan Ming Man
Dev-In-Town:Linq To Sql by Chan Ming ManDev-In-Town:Linq To Sql by Chan Ming Man
Dev-In-Town:Linq To Sql by Chan Ming Man
 
NoSQL: Why, When, and How
NoSQL: Why, When, and HowNoSQL: Why, When, and How
NoSQL: Why, When, and How
 

Recently uploaded

So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 

Recently uploaded (20)

So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 

Raven lovin' - .NET does NoSQL

  • 1. RavenDB lovin’ .NET does NoSQL
  • 2. about:author Longtime user of ORMs Experienced in object DBs Raven in personal projects Raven at 3M Raven with Ayende!
  • 4. SQL: Databases done right. Circa 1970.
  • 5. SQL: Databases done right. Circa 1970. CAP Theorem for distributed systems: Consistency, Availability, Partition tolerance Choose 2.
  • 6. SQL: Databases done right. Circa 1970.
  • 7. SQL: Databases done right. Circa 1970.
  • 8. SQL: Databases done right. Circa 1970. SELECT UPPER(Name) SELECT UPPER(Name) SELECT TOP 10 UPPER $ SET SOURCEFORMAT “FREE” FROM Customer FROM (c1.Name) IDENTIFICATION DIVISION. WHERE Name LIKE'A%' ( FROM Customer c1 Display Prompt. ORDER BY Name SELECT *, WHERE c1.Name LIKE 'A%' DISPLAY “I <3 SQL!”. RN = row_number() AND c1.ID NOT IN STOP RUN. OVER (ORDER BY ( Name) SELECT TOP 20 c2.ID FROM Customer FROM Customer c2 WHERE Name LIKE WHERE c2.Name LIKE 'A%‘ 'A%' ORDER BY c2.Name ) A ) ORDER BY c1.Name WHERE RN BETWEEN 21 AND 30 ORDER BY Name var names = db.Customers .Where(c => c.Name.StartsWith(“A”)) .OrderBy(c => c.Name) Or how about… .Select(c => c.Name.ToUpper()) .Skip(20) .Take(10);
  • 9. SQL: Because objects and relational databases go together like peanut butter and tuna fish
  • 10. SQL + OO = Peanut butter + Tuna. The object-relational impedance mismatch: •Polymorphism doesn’t exist in the relational world •Encapsulation creates fragile database models •Inheritance results in inefficient relational queries •Leaky abstraction
  • 11. SQL + OO = …but you can mask the tuna only so long…
  • 12. SQL + OO = var today= DateTime.Now; context.TheBaseTypes .Where(b => b.DateCreated == today) .ToList(); “Expressing this query in LINQ to Entities is short and sweet. But don’t be fooled. It’s a hefty request. You’re asking EF and your DB query each table that maps to the derived entities and join each one to the BaseTypes table. In my environment, this creates a 3,200 line SQL query, which can take Entity Framework some time to build and the database some time to execute.” -Julie Lerman, MSDN Magazine, August 2012
  • 13. ORM: The Vietnam of Computer Science “ORM is the Vietnam of Computer Science. It represents a quagmire which starts well, gets more complicated as time passes, and before long entraps its users in a commitment that has no clear demarcation point, no clear win conditions, and no clear exit strategy.” -Ted Neward
  • 14. SQL: The Hammer for every nail “The first to present his case seems right, till another comes forward and questions him.”
  • 15. NoSQL: A modern alternative to relational databases Don’t use T-SQL Typically schema-free Built for distributed scalability Relax ACID guarantees
  • 16. NoSQL: A modern alternative to relational databases Trippy things like… Cheap, fast reads Horizontal scalability Flexible, schema-free models
  • 18. NoSQL has problems, too. Painful query models Immature tooling Complex APIs Poor language support
  • 19. RavenDB “I’ve consulted on NHibernate and other ORMs for over a decade. I’ve seen the same problems repeated over and over. I wanted to fix that. So I created RavenDB.” -Ayende
  • 20. RavenDB Get out of the RDBMS/ORM mess Fix shortcomings of NoSQL Evolve data storage “I intentionally designed RavenDB and its .NET API to deal with problems and frustrations in the NHibernate / RDMBS model.” -Ayende
  • 23. RavenDB Putting stuff in the database should be easy
  • 25. RavenDB LINQ is the best query language on the planet
  • 26. RavenDB Developers should fall into the pit of success
  • 27. RavenDB Reads should be *fast*. Index fast. Lock-free, non-ACID reads “Better stale data quickly than live data slowly.” Every read is a query against an index. Yes! Indexes should be created
  • 30. RavenDB Scalability should be easy, natural Replication: master-to-slave, master-to-master Sharding: split your data across servers transparently
  • 31. Recap! It’s an alternative to the SQL + ORM mess Raven is scalable! You should totally use it for your next project :-)
  • 32. Thank You! Slides: bit.ly/raventalk Twitter: @JudahGabriel Blog: DebuggerDotBreak.wordpress.com

Editor's Notes

  1. Consistency: all nodes see the same data at the same timeAvailability: a guarantee that every request receives a response about whether it was successful or failedPartition tolerance: the system continues to operate despite arbitrary message loss or failure of part of the system
  2. The object-relational impedance mismatch is a set of conceptual and technical difficulties that are often encountered when a relational database management system (RDBMS) is being used by a program written in an object-oriented programming language or style; particularly when objects or class definitions are mapped in a straightforward way to database tables or relational schemata.
  3. BASE: Basically available, soft state, eventually consistent