What is namespace in aerospike
Asked Answered
F

6

12

I'm new to Aerospike.

What is a namespace and how to create a namespace in aerospike?

Flaming answered 22/9, 2015 at 9:23 Comment(0)
M
13

a namespace is a Database name in Aerospike, and set is the Table name and Bins are the columns in Aerospike.

Mooneye answered 24/11, 2016 at 10:3 Comment(1)
You missed the records which contain multiple bins.Reversible
S
16

A Namespace is a top level container for data in Aerospike. The most important part of a namespace configuration is the storage definition (RAM only, RAM + Persistence on disk, or disk only - usually Flash storage). You can also configure other things at the namespace level, like the data retention policy (default ttl and high water mark to protect against running out of disk or memory). I would recommend reading this page for details.

You need to have at least 1 namespace defined in your cluster. Also, you cannot dynamically add or remove namespaces in a cluster. In order to add or remove a namespace in a cluster, you have to stop all the nodes (at this point), change the configuration on all the nodes (IMPORTANT - configuration should match on all nodes) and then restart the nodes one by one.

For more details on configuration of a namespace, you should go through this page. (Already mentioned in another response to your question).

Soutine answered 22/9, 2015 at 15:44 Comment(0)
M
13

a namespace is a Database name in Aerospike, and set is the Table name and Bins are the columns in Aerospike.

Mooneye answered 24/11, 2016 at 10:3 Comment(1)
You missed the records which contain multiple bins.Reversible
W
3

In simple terms,

namespaces are semantically similar to databases in an RDBMS system. Within a namespace, data is subdivided into sets (similar to tables) and records (similar to rows).

Wolf answered 15/12, 2015 at 12:15 Comment(0)
A
2

If you want to dynamically create Namespace then you can do something like below- - Modify the aerospace.conf file on the server side . - Then restart the cluster which should restart all the nodes.

For more go to this link http://www.aerospike.com/docs/operations/configure/namespace/

Acronym answered 22/9, 2015 at 11:23 Comment(2)
The namespace keyword is used to declare a scope. This namespace scope lets you organize code and gives you a way to create globally unique types.Having namespaces helps you to control the scope of the class and its methods. If there are no namespaces, we would not be able to use multiple classes with the same name.Acronym
I am not sure that changing the configuration file and restarting the process actually counts as dynamic.Fortyfour
K
2

Namespaces are the top level containers for data. A namespace can actually be a part of a database or it can be a group of databases as you would think of them in a standard RDBMS – the reason you collect data into a namespace relates to how the data is going to be stored and managed.

A namespace contains records, indexes and policies. A policy dictates the behavior of the namespace, including:

  • How data is stored: DRAM or disk
  • How many replicas should exists for a record.
  • When records should expire.

For a detailed study on the Data model and architecture of Aerospike read the following link: http://www.aerospike.com/docs/architecture/data-model.html

Kowal answered 23/11, 2015 at 11:49 Comment(0)
P
-1

Aerospike namespaces are similar to databases in a RDBMS.

The table below shows the correspondence between Aerospike and RDBMS:

+-----------+-------------+
| Aerospike | RDBMS       |
+-----------+-------------+
| Namespace | Database    |
| Set       | Table       |
| Record    | Row         |
| Bin       | Column      |
| Key       | Primary Key |
+-----------+-------------+
Patois answered 30/7, 2023 at 9:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.