RavenDB is a document database built on .NET that stores data in JSON format. It provides a .NET client API for CRUD and querying operations using LINQ. Key features include dynamic and static indexing for querying, scalability through sharding and replication, and a schema-free design. The document covers an overview of NoSQL databases, RavenDB architecture and features, and development with the .NET client API. Additional topics like advanced querying, server administration, and deployment options are recommended for further learning.
2. Hi, My Name Is…
Alonso Robles
@alonsorobles
http://alonsorobles.com
Principal Consultant at Headspring
@headspring
http://headspring.com
3. Before we begin…
Central Texas GiveCamp
Developers
Sponsors
http://ctxgivecamp.org
RavenDB Boot Camp
September 5th-6th
2-day hands-on workshop
Headspring, Austin, TX
http://headspring.com
4. Agenda
NoSQL Crash Course
Overview of RavenDB
Development with RavenDB
6. History of the Datum
We (the programmers) gave
birth to data
We put it (the data) in memory
We discovered a way to persist it
So we put it in files
And we had more problems to
solve…
7. From Data To Management
Common problems
Data retrieval
Concurrent writes
Optimize for space
Data aggregation
Lead to the introduction of
RDBMS
SQL
8. RDBMS + SQL
Strengths Limitations
ACID Scaling horizontally is hard
Atomic
Consistent Scaling vertically is expensive
Isolated Object to relation mapping can
Durable be difficult
Relational
Table / Row
Rich query support
Data Integrity
Foreign Keys
Enforced Schema
10. Polyglot Persistence
Relational
MS SQL Server
MySQL
Key-Value
Redis
Dynamo
Column-Oriented
BigTable
Cassandra
Document-Oriented
MongoDB
RavenDB
11. Key-Value
Simplest of all data stores
IDictionary<string, object>
Key is a string
Value is a blob
Schema free
Query by key
Or key range sometimes
Good candidate for
User session storage
Shopping carts
12. Document-Oriented
Like a key-value store
Document in known format
JSON
BSON
XML
Supports server side operations
Good for
Complex objects
DDD Aggregates
13. Column-Oriented
Not relational at all
Schema free
Concepts to understand
Column families
Row Keys
Columns
A Key Value Pair
Good for
Large amounts of sparse data
14. Is SQL Dead?
Nope
It’s still the strongest option for
Reports
Dynamic Aggregations
Data integrity enforcement
Remember
NoSQL = Not Only SQL
Or… NoSQuirreLs
16. What is it?
It’s a document database
Built on .NET for .NET
JSON data storage
Built on top of Lucene
Open source
Gets out of your way
It just works
Just code – studio not required
17. Features I Really Like
Scalable via shards and/or replication
Schema free
Easy to learn and develop against
Full power of Lucene
Full-text search
Faceted search
Auto suggest
More like this
Multiple deployment options
19. .NET Client API
IDocumentStore
Session factory
Thread safe heavy weight object
Thread safe
Use single instance per application
IDocumentSession
Interacts with the database
Not thread safe light weight object
Implements Unit of Work pattern
Use one per thread or web request
21. Query Operations
Rich LINQ support
Basic Query
IDocumentSession.Query<T>()
Returns a IRavenQueryable<T>
Implements IQueryable<T>
Filtering
Use a Where(…) clause
Paging
Use Skip(int) and Take(int)
22. Dynamic Indexes
Automagically created on demand
Raven learns about your application
Dynamic indexes marked as temporary
Removed if not used
Promoted to permanent if used a lot
23. Static Indexes
Do it your self
It’s just a class
That defines
Implicit or explicit index name
One or more map functions
Optional reduce function
Optional transform function
May define many other options like
Field options
Storage
Analysis
24. More to Learn
Querying
Using the query statistics
Indexes
More options
Hierarchical indexes
Polymorphic indexes
Projections
Document relationships
Attachments
Shards and Replication
25. Even More to Learn
Advanced topics
Transaction support
Document metadata
Spatial search
Dynamic fields
Database commands
Server administration
Deployment options
Multi-tenancy
Using bundles
26. Where to Learn More
Official website
http://ravendb.net
Google group
http://groups.google.com/group/ravendb
GitHub
http://github.com/ravendb/ravendb
Headspring
Exclusive North American Training Partner
RavenDB Boot Camp on Sept 5th-6th
More info @ http://headspring.com
Follow me on Twitter
@alonsorobles
27. The End
Alonso Robles
@alonsorobles
http://alonsorobles.com
Editor's Notes
1970 Edgar F Codd – A Relational Model of Data for Large Shared Data Bank