Chapter 3. Basic Operations
In Chapter 2, we illustrated what an introductory sample application might look like. We briefly discussed establishing connections, retrieving data, and inserting data. In this chapter, we will dive into all the basic operations you’ll use when putting Aerospike to work, such as creating, reading, updating, and deleting. These operations are the heart of day-to-day usage. You’ll use what you learn in this chapter every day you use Aerospike.
We will also discuss time-to-live (TTL), which helps with data lifecycle management, work more with WritePolicy
and Policy
, and explore various data types and how to use them. In particular, you’ll see how the Aerospike client interface handles the data types for you in many cases, making data movement between systems easier.
CRUD Operations
Create, read, update, and delete (CRUD) are the four fundamental operations of interacting with any database, including Aerospike, and you will need them to get started with the basics. Before discussing the basic operations in depth, we should talk about the data types that can be used in Aerospike natively and the data lifecycle options available.
Data Types
A record in Aerospike can contain one or more bins. When created, Aerospike bins are of certain data types. It is important to know the various data types so you can make informed decisions based on their capabilities and limitations as well as the data size costs.
The Aerospike client driver’s built-in conversion ...
Get Aerospike: Up and Running 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.