Book Image

RavenDB 2.x Beginner's Guide

By : Khaled Tannir
Book Image

RavenDB 2.x Beginner's Guide

By: Khaled Tannir

Overview of this book

RavenDB is a second generation document database written in .NET, offering a flexible data model designed to address requirements coming from real-world systems. It is different from the other document databases around, as with RavenDB you can get up and running in a few minutes, and that includes grasping all the basics. It allows you to build high-performance, low-latency applications with ease and efficiency.RavenDB 2.x Beginner's Guide introduces RavenDB concepts and teaches you everything, right from installing RavenDB, to creating documents, and querying indexes. This book will help you take advantage of powerful, document-oriented NoSQL databases and build a solid foundation on which you can create your .NET applications. This book presents RavenDB, the .NET document-oriented NoSQL database, through a series of clear and practical exercises that will help you to take advantage of this database server. The book starts off with an introduction to RavenDB and its Management Studio. You will then move ahead and learn how to quickly and efficiently build high performance, NoSQL document-oriented .NET applications using the .NET client API or the HTTP REST API. Next, Dynamic and static indexes that use map/reduce to process datasets are covered. You will then see how to create and query these indexes, with the help of detailed examples. You will also learn how to deploy your RavenDB server in a production environment and how to optimize and secure it.With numerous practical examples, RavenDB 2.x Beginner's Guide teaches you everything you need to know for building high performance .NET document-oriented NoSQL databases.
Table of Contents (21 chapters)
RavenDB 2.x Beginner's Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – downloading and installing RavenDB


We are going to learn how to download and install RavenDB on a computer running on Microsoft Windows, using the following steps:

  1. To download RavenDB, head to the download page on the RavenDB official website, http://ravendb.net/download.

    Tip

    On the official website download page, we will find a couple of selections and different versions that can be downloaded. We can download the latest official release, the latest unstable release which is not recommended for use in a production environment.

  2. Click on the download link for the latest stable release under RavenDB's latest official release. This will start downloading a ZIP archive.

    Note

    At the time of writing, RavenDB v2.0.0 Build 2375 was the latest version. If a newer stable release is available, you should download that version instead.

  3. Once the download is finished, open this file up, and extract everything to C:\RavenDB-Build-2375 (which is the name of ZIP archive file at the time of writing).

  4. Open C:\RavenDB-Build-2375 and explore it. It should look like this:

What just happened?

In steps 1 and 2, we downloaded the ZIP archive containing the .NET assembly files for the RavenDB server.

Tip

As an alternative to the official RavenDB website, RavenDB is also available for download via the NuGet package manager: http://nuget.org/packages/RavenDB.Client.

The NuGet package manager is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework.

You can also download the source code of RavenDB and some other bundles, which are additions to RavenDB to extend its features and functionalities.

In step 3, we extracted files from the ZIP archive file to C:\RavenDB-Build-2375.

In step 4, we explored the different files and folders of RavenDB.

We do not have to be concerned about all the folders extracted, there are different versions of a RavenDB client. You have the lightweight client compatible with the Microsoft's .NET 4.0 Framework Client Profile and the Embedded RavenDB Client that you can use if you want to embed RavenDB in your application. The extracted files folder contains some samples that can be useful to learn how to do different things in RavenDB especially more complex things such as Sharding.

The important directory that we will really worry about here is the Server directory. The Server directory contains the Raven.Server.exe file which is our main executable file that we will run to launch our database server.

Raven.Server.exe can be run directly from the Server directory or by using the Start.cmd file located at the root of our folder C:\RavenDB-Build-2375.

Note

The latest RavenDB installation package includes these directories:

  • Client: A lightweight client for use with .NET 4.0

  • Silverlight: Silverlight 5.0 client

  • Silverlight-4: Silverlight 4.0 client

  • EmbeddedClient: The files necessary for using RavenDB in embedded mode

  • Server: The files required to use RavenDB in server mode

  • Web: The files required to use RavenDB under IIS

  • Bundles: The files for extending RavenDB in various ways

  • Samples: The sample RavenDB applications to get you started