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 – launching RavenDB in the Console mode


You have already downloaded the RavenDB package and extracted it to a local folder on your computer. Now you are ready to launch RavenDB in the Console mode. You will run the database server using the Start.cmd command file:

  1. In the Windows Explorer, select file C:\RavenDB-Build-2375\Start.cmd and press Enter or double-click on it to launch the RavenDB database server in the Console mode.

    Note

    While the Raven.Server.exe application is running, it logs any activity on the RavenDB server. In the Console mode, the log activity is displayed within the command prompt window.

  2. Click on the command prompt window to activate it and take a look at the RavenDB activity log.

What just happened?

We learned how to launch the RavenDB server.

In step 1, we launched the RavenDB server using the command file C:\RavenDB-Build-2261\Start.cmd.

In step 2, we activated the command prompt window and analyzed the RavenDB activity log.

Let's have a closer look at the activity log displayed within the launching process of RavenDB and analyze it.

The first log line indicates that the RavenDB server has been launched and it is ready to process requests. We can also see the RavenDB server's Build version, in our case it is Version 2.0.3 with 2375 as the Build number. If you have downloaded a newer version of RavenDB, you might have another version number and/or another Build version number.

The second line of the server activity log displays the time indicated in milliseconds that was needed by RavenDB to be launched and ready to process requests. This launching time will be different from one computer to another, based on the computer hardware configuration, the CPU activity, and the available memory resources.

Other configuration parameters are also logged and displayed such as the Data Directory, which indicates the directory where your data will be saved, the machine hostname, and the TCP/IP listening port number which is a part of the Server URL.

Creating your first RavenDB database

We are going to explore another great feature of the Management Studio by creating a new database and add some sample data that we can use to learn more about the Management Studio and RavenDB.

Many times, when you start building an application, you want to see what the data will look like in the user interface well before the database (or the web service) is actually ready. RavenDB makes it easier to see that data, compared to other systems. To do this, we can use the Management Studio.