2

I would like to make aerospike database which will contain the following structure:

scheme = {
    "name": "name",
    "version": "version", 
    "fields": [
        {   
            "name": "clicks",
            "total_count": 67238882342,
         ...
        }
    ]
}

scheme name and scheme fields belong to different level. But aerospike doesn't support UNION/JOIN operations. How can I designed my DB?

3 Answers 3

2

Hey this is very simple you don't have to worry about joins in aerospike because It is schema less database .

if your object is like given below :

// Json Object

{ "name": "name", "version": "version",

// It is a list of json objects again

"fields": [
    {   
        "name": "clicks",
        "total_count": 67238882342,
     ...
    }
]

}

You can use Large order list which can solve this type of scenario

link :: https://www.aerospike.com/docs/guide/llist.html

1

Aerospike supports nested lists & maps. See the java example.

1

Eugeny,

The scheme you have given can be easily stored in aerospike. The fields will be of datatype list and any collection can be stored inside the list. In your case it is a map. One point I am not able to understand is why do you need UNION or JOIN to store this schema.

One thing you need to understand is Aerospike is a Key/Value store and you can create secondary indexes on required columns. On recent release, you can create secondary indexes on collections also. Please note secondary indexes stored in RAM.

You cannot JOIN on bins (column) from set to set.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.