Skip to Content
Aerospike: Up and Running
book

Aerospike: Up and Running

by V. Srinivasan, Tim Faulkes, Albert Autin, Paige Roberts
October 2024
Intermediate to advanced
220 pages
6h 26m
English
O'Reilly Media, Inc.
Content preview from Aerospike: Up and Running

Chapter 6. Data Modeling

In the previous chapters, you looked at the Aerospike architecture and the facilities the database provides. In this chapter we will discuss how to model data in Aerospike to solve common problems. As with most databases, there are a variety of techniques that can be used to solve the same problem, so we will address some of the pros and cons of various approaches.

Note that there are many different ways to model data in Aerospike, and the appropriate technique depends on the problem trying to be solved. This chapter will introduce some of the more common techniques, but it is by no means exhaustive.

Aerospike Data Modeling

Aerospike supports records that have a structure similar to a relational database and it supports secondary indexes similar to a relational database, so it would seem intuitive that data modeling techniques would be similar to those used in relational databases. However, this is not always the case. To illustrate this, let’s look at a classical way of aggregating data.

Suppose you want to model a customer record. The customer has zero or more addresses associated with it, and the addresses have no business use if they are not associated with a customer. This is the classical case of aggregation and you can represent this as shown in Figure 6-1.

Figure 6-1. Entity–relationship model of a customer with their addresses

In a relational ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

GitOps and Kubernetes

GitOps and Kubernetes

Billy Yuen, Todd Ekenstam, Jesse Suen, Alex Matyushentsev
Docker in Action, Second Edition

Docker in Action, Second Edition

Stephen Kuenzli, Jeffrey Nickoloff
gRPC: Up and Running

gRPC: Up and Running

Kasun Indrasiri, Danesh Kuruppu

Publisher Resources

ISBN: 9781098155599Errata Page