RavenDB in Action
Itamar Syn-Hershko
  • MEAP began June 2013
  • Publication in Spring 2016 (estimated)
  • ISBN 9781617291500
  • 400 pages (estimated)
  • printed in black & white

RavenDB in Action introduces RavenDB and the document database model. After explaining the basics and offering a quick-and-dirty sample application, this end-to-end guide dives into core RavenDB techniques. You'll find thoroughly-documented examples on extending RavenDB, deployment stories, and tips to ensure production readiness, along with coverage of advanced topics like full-text search. After reading this book, you should be comfortable building efficient database-backed applications using RavenDB.

Table of Contents show full


1. A 2nd generation document database

1.1. The database chronicles

1.1.1. Relational databases and the modern world

1.1.2. NoSQL

1.2. Introducing RavenDB

1.2.1. Benefits of RavenDB

1.2.2. Basic concepts

1.2.3. LINQ

1.3. Installing RavenDB

1.3.1. Running the server

1.3.2. The Management Studio

1.3.3. Adding RavenDB to your project

1.4. Starting to work with RavenDB

1.4.1. Instantiating a DocumentStore

1.4.2. The DocumentSession

1.4.3. Storing a new document

1.4.4. Loading and editing a document

1.4.5. Deleting documents

1.4.6. Querying using LINQ

1.5. Summary

2. Your first RavenDB application

2.1. The Raven Bookstore

2.1.1. Planning the Model

2.1.2. Setting up

2.1.3. Session Management

2.2. Basic Operations

2.2.1. Listing all books in the system

2.2.2. Adding new books

2.2.3. Viewing an existing book

2.2.4. Editing existing books

2.2.5. Deleting a book

2.3. Querying

2.3.1. Paging

2.3.2. Sorting results

2.3.3. Query statistics

2.3.4. Filtering

2.4. Deployment and Testing

2.4.1. Deployment options

2.4.2. Testing

2.4.3. Handling Model changes

2.5. Summary


3. RavenDB Indexes

3.1. The Index Store

3.1.1. The RavenDB indexing process

3.1.2. What is an index?

3.1.3. A Lucene index

3.1.4. Eventual consistency

3.2. Simple Map indexes

3.2.1. The Map Function

3.2.2. A simple example of an index

3.2.3. Querying indexes

3.2.4. Peeking into the index

3.2.5. Mapping collections

3.3. Map/Reduce indexes

3.3.1. What is Map/Reduce?

3.3.2. The Reduce function

3.3.3. Map/Reduce by example

3.4. Summary

4. Working with indexes

4.1. The index lifecycle

4.1.1. Automatic index selection

4.1.2. Auto-indexes

4.1.3. Index aging and prioritization

4.2. Creating indexes manually

4.2.1. From code

4.2.2. Registering indexes on the server

4.2.3. Error Handling

4.3. Index field options

4.3.1. Setting a field option

4.3.2. Available field options

4.3.3. Custom field options and automatic index selection

4.4. Querying

4.4.1. Specifying which index to query

4.4.2. Results caching

4.4.3. Waiting for non-stale results

4.4.4. Personal consistency

4.5. Summary

5. Document-oriented Data Modeling

5.1. RavenDB’s approach to document-oriented modeling

5.1.1. Documents and Data Entities

5.1.2. Unit of Change

5.1.3. Transactional Boundaries

5.1.4. Denormalization

5.2. Working with Referenced documents

5.2.1. Includes

5.2.2. Semantic IDs

5.2.3. Querying on referenced data

5.3. Design considerations

5.3.1. Size considerations

5.3.2. Concurrent Writes and Optimistic Concurrency

5.4. Summary


6. Full-text, geo-spatial and reporting queries

6.1. Full-text search queries

6.1.1. Enabling full-text search on a field

6.1.2. Lucene’s analysis chain

6.1.3. Customizing an Analyzer for a field

6.1.4. Results highlighting

6.1.5. Suggesting alternate spellings for search terms

6.2. Taking advantage of the inverted index

6.2.1. Accessing the list of terms

6.3. Reporting queries

6.3.1. Dynamic Aggregations with Facets

6.3.2. The SQL replication bundle

6.4.1. Point and Radius Searches

6.4.2. WKT shapes

6.4.3. Spatial Relations: The 4 supported search types

6.5. Summary

7. Scaling out

7.1. Replication

7.1.1. Master-Slave replication

7.1.2. Master-Master replication

7.2. Sharding

7.2.1. Blind Sharding

7.2.2. Data-driven sharding

7.3. Summary

8. Extending RavenDB

8.1. Server-side bundles

8.1.1. Internalized (provided) bundles

8.1.2. Using external bundles

8.1.3. Custom analyzers

8.2. Writing a custom bundle

8.2.1. Building blocks

8.2.2. Client-side extension points

8.2.3. Wrapping up

9. Advanced capabilities

9.1. Advanced querying

9.1.1. The Advanced.DocumentQuery API

9.1.2. Plan for effective client caching

9.1.3. Lazy operations

9.1.4. Query intersection

9.2. Working with documents metadata

9.2.1. Reading document metadata

9.2.2. Querying on metadata

9.2.3. Manipulating metadata

9.3. The DocumentStore conventions

9.3.1. The identity property locator

9.3.2. Collection name resolution

9.3.3. Custom document key generation

9.3.4. Advanced serialization and deserialization

9.4. The Changes API

9.4.1. SUbscribing to and unsubscribing to notifications

9.5. Unbounded results set

9.6. Performing server-side updates

9.6.1. Patching

9.6.2. Scripted patching

9.6.3. Set-based operations

9.7. Summary

9.7.1. Leveraging aggressive caching

10. Getting ready for production

10.1. Deployment

10.1.1. Installing a RavenDB server

10.1.2. Database authentication

10.1.3. Configurations

10.2. Backup strategies

10.2.1. Enterprise backup solutions

10.2.2. The Raven.Backup tool

10.2.3. Periodic exports

10.2.4. The Smuggler tool

10.3. Data migrations

10.4. Summary


Appendix A: The rest API cheatsheet

About the Technology

The data you encounter in the real world is usually easier to think of as objects or documents than as the tables and rows required by a standard RDBMS. RavenDB, a modern document-oriented database written in .NET, requires no schema to be declared and enables developers to work with data more naturally. RavenDB applications are high-performance, low-latency, and easy to scale and maintain.

What's inside

  • Start fresh or expand your RavenDB knowledge
  • Document-oriented modeling
  • Scaling out

About the reader

Readers should be proficient in C#. No experience with RavenDB, NoSQL, or document databases required.

About the author

Itamar Syn-Hershko is a software architect with extensive experience in database technologies and search engines. Itamar served as a core developer for RavenDB at Hibernating Rhinos where he also delivered the official RavenDB workshop. He's an active participant of various open-source projects and a committer for Apache Lucene.NET.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook
MEAP eBook $39.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks