25Apache Ignite in C#

This chapter's example uses C# to build a NoSQL key-value database. The example runs on the local computer, but it shouldn't be hard to adapt it to run in the cloud.

This example is much less complicated than the examples described in the previous chapters, largely because a key-value database has fewer features. Relational, graph, and document databases all provide sophisticated querying features. In contrast, a key-value database mostly just stores values and later retrieves them.

Apache Ignite can actually function as a relational database, but Chapters 16 through 19 demonstrated that kind of database, so this chapter uses only Ignite's key-value features.

A key-value database lets you associate a piece of data with a key and then later use the key to retrieve the data. By default, Ignite stores data in RAM, so the data is lost when your program ends. This chapter explains how to use volatile or nonvolatile data.

If you skipped Chapter 24, which built a similar example in Python, go to that chapter and read the beginning and the first two sections, which explain how to install Ignite and how to start a database node with or without persistence.

When you reach the section “Create the Program” in Chapter 24, return here and start on the following sections.

CREATE THE PROGRAM

Before you can make a C# program use the Ignite database, you need to install a database adapter for it. Then you can start writing code.

Install the Ignite Database Adapter

Get Beginning Database Design Solutions, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.