Dejan Miličić

Introducing RavenDB

The Database for Modern Data Persistence

Dejan Miličić
Novi Sad, Serbia
ISBN 978-1-4842-8918-1e-ISBN 978-1-4842-8919-8
© Dejan Miličić 2022
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature.

The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.

To Filip, Olivera, and Renata.

Introduction

When was the last time you paid attention to the windows in your home? Probably when they were dirty and needed cleaning, or if one of them got broken and needed replacement. But, if everything is okay with them, you will not pay attention.

A good database is like a window. It “just works.” It is fast and reliable without needing you to be a database expert. In the ideal scenario, you will not pay attention to it - you will concentrate on doing your business, and a database is there to support you.

For the past 40+ years, we have been using relational databases. It would be natural to think that we mastered them to the extent that an average developer can build applications that scale as the organization grows, supporting ever-increasing traffic volume and data volume. Additionally, with the emergence of web applications in the 1990s, we have a potentially unbounded audience, and terabytes are new gigabytes.

Even if you have years of experience with relational databases, you already know what awaits you at the very start of the project: queries that join multiple tables (sometimes up to seven or eight of them), caching layer to compensate for slow queries, numerous performance problems as the amount of data in the database grows over time, the additional layer of data persistence modeling.

It is not uncommon even for application developers with 20+ years of experience to run into 20% of requests which are permanently slow because of a relational database. And then, they live the Pareto principle - spending 80% of maintenance time nurturing that 20% of code not working fast enough. Over time, this grows into insecurity and chronic imposter syndrome.

If only you were an expert, it would be much easier! But you are not an expert. You do not have months to spend digging deep into the internals of the database. You do not want to work on optimizing the database. You want to work on developing your application.

RavenDB is a database created with this goal – to empower you to produce outstanding results without needing to become an expert in databases. Expert knowledge is embedded, so the database will assist you, advise you, and safeguard you as you develop your application. Most common antipatterns (like full table scans) are actively prevented.

I encountered RavenDB a decade ago and fell in love with it over the years. I discovered that RavenDB is suitable for small projects, fast prototyping, and scaling to enterprise-grade Domain-Driven Design projects.

This book is a gentle introduction to NoSQL concepts. Starting from zero, you will learn the basics of RavenDB, the NoSQL document database, its query language, and the indexing engine. You will also discover how RavenDB reacts to your operational behavior, protecting and guiding you. After completing this book, you will be capable of installing RavenDB and using it for efficiently storing and querying data.

To follow the content of this book, you do not need anything but modern web browsers and elementary knowledge of JavaScript. You will grasp NoSQL principles (like map/reduce) and comprehend RavenDB mechanisms. After you finish it, you can easily apply this knowledge to building applications in any modern programming language.

So, let’s dive into the fantastic world of RavenDB together!

Acknowledgments

I want to express my gratitude to Jonathan Gennick and Jill Balzano from Apress for approaching me with the idea of writing this book and supporting me patiently along the way, which was not always smooth.

My most profound appreciation goes to Oren Eini, Paweł Pekról, and Arkadiusz Paliński.

Through numerous discussions, Marcin Lewandowski, Danielle Greenberg, Grzegorz Lachowski, and Igal Merhavia answered all my questions and helped me clarify concepts and ideas.

Discussions with Đorđe Đukić, Aleksandar Sabo, Shahar Erez, and Federico Lois have been illuminating.

Christopher Balnave, Igor Ivanović, and David Ben Horin read early drafts; their remarks were helpful.

This book wouldn’t have been possible without support from my family: my wife Renata, my daughter Olivera, and my son Filip, who have supported and encouraged me.

Table of Contents
Index 193
About the Author
Dejan Miličić

A photo of Dejan Milicic.

is a consultant with more than 20 years’ experience as a professional software developer. His experience includes designing, writing, and maintaining applications, focusing on software architecture and backend development. He advocates domain-driven design, behavior-driven development, functional programming, and API-first development.

Miličić’s passion for RavenDB goes back to 2015, when he started using this NoSQL database for small hobby projects and quickly realized it is applicable to a wide range of applications. He specializes in RavenDB because it is well suited for fast prototyping and development of everything from line-of-business applications to large enterprise distributed systems.

 
About the Technical Reviewer
Chris Woodruff

A photo of Chris Woodruff.

(or Woody as he is commonly known) has a degree in computer science from Michigan State University’s College of Engineering. Woody has been developing and architecting software solutions for over 20 years and has worked on many platforms and tools. He is a community leader, helping such events as GRDevNight, GRDevDay, West Michigan Day of .NET, and Beer City Code. He was also instrumental in bringing the popular Give Camp event to Western Michigan, where technology professionals lend their time and development expertise to assist local nonprofits. As a speaker and podcaster, Woody has discussed various topics, including database design and open source. He has been a Microsoft MVP in Visual C#, Data Platform, and SQL and was recognized in 2010 as one of the top 20 MVPs worldwide. Woody is an Engineering Team Leader for Rocket Homes and leads a team building out a new Enterprise Service Bus for the company.
 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.243.100