Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
RavenDB 2.x Beginner's Guide

You're reading from  RavenDB 2.x Beginner's Guide

Product type Book
Published in Sep 2013
Publisher Packt
ISBN-13 9781783283798
Pages 356 pages
Edition 1st Edition
Languages
Author (1):
Khaled Tannir Khaled Tannir
Profile icon Khaled Tannir

Table of Contents (21) Chapters

RavenDB 2.x Beginner's Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Getting Started with RavenDB RavenDB Management Studio RavenDB.NET Client API RavenDB Indexes and Queries Advanced RavenDB Indexes and Queries Advanced RavenDB Document Capabilities RavenDB Administration Deploying RavenDB Scaling-out RavenDB RavenDB Profiling RavenDB HTTP API Putting It All Together Pop Quiz Answers Index

What is RavenDB?


RavenDB is an open source document-oriented NoSQL designed especially for the .NET/Windows platform. It requires commercial licensing (with a special pricing available for BizSpark startup organizations). A free edition is available for open source projects, but it must be applied for.

RavenDB supports multiple databases and, as other database servers, a database acts as a container of data. RavenDB can easily handle hundreds or thousands of databases on the same instance and was explicitly designed with multi-tenancy (or multi-instances) in mind. This allows RavenDB to manage large numbers of databases, but at any given time, only one database is active and taking resources.

Each RavenDB database contains a set of documents which can be divided into collections. A Collection is a logical way of thinking of document groups. Within a Collection, documents share the same entity name.

Note

RavenDB's collections are very similar to MongoDB's collections which is another document-oriented NoSQL database.

A Document is a unit of data and it contains a set of fields or key-value pairs. It is important to note that values can be arrays, complex types, or even arrays of complex types. The keys are strings; the values can be of various types such as strings, integers, and so on. You can even store a document as the value of a field.

RavenDB database contains Indexes which works differently than RDBMS indexes. RavenDB uses indexes to satisfy queries. You may index the whole query's field or specify the fields you want to index in a document. RavenDB takes the query, analyses it and extracts an index which can answer the query. Also, it has the ability to auto generate indexes from your queries.

RavenDB uses JSON (JavaScript Object Notation) to store documents. JSON is a way to serialize data and is a lightweight data-interchange format. On the client side, this is used primarily by RavenDB and then data is serialized to .NET objects. But on the server side that data is all JSON, all the time.

RavenDB does not have a schema (schema-less) and documents do not have to have a specific field or column. Also, there are no explicit relations among the documents that exist in RavenDB. We might have some Document when we build a store Document and maybe we want to use a Document to lookup in other Document, this relation is only in data and not enforced by the database.

Note

RavenDB is a document-oriented database and is not relational. That means it doesn't maintain foreign key constraints.

RavenDB is fully transactional. That means, it fully supports both implicit and explicit transactions and we can take full advantage of this feature. Unlike most NoSQL databases that adhere to the BASE properties, RavenDB supports the ACID properties for write operations. ACID, as we all know, stands for Atomicity, Consistency, Isolation, and Durability, and support for ACID is what makes us so comfortable using RDBMS systems with respect to data integrity. BASE, on the other hand, stands for Basically Available, Soft state, Eventual consistency.

RavenDB stores Indexes data and allows storing large data files through using attachments. Attachments are a large chunk of data (BLOBsBinary Large OBjects) that are used to store images, music files, videos, and other kind of binary data. Attachments in RavenDB can have metadata and can be replicated between nodes. Also, it can be cascade deleted on document deletions (which requires the CascadeDelete bundle called Raven.Bundles.CascadeDelete to be activated) and are HTTP cacheable.

Note

RavenDB Indexes look like a LINQ query, but they aren't. They are used to build an Index that you can then use just such as in RDBMS.

You have been reading a chapter from
RavenDB 2.x Beginner's Guide
Published in: Sep 2013 Publisher: Packt ISBN-13: 9781783283798
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}