I have 7 fields in each record,two strings and five 64 bit integers. Of these,one of the integers is unique. I need to store all such records into the DB. In multi-index, I have a structure and this structure is being indexed by that integer value. If I have to similarly create a structure and store it as the value in LMDB, then what is its difference from multimap? I can do the same in multimap also. Then how does LMDB become a database.


Sent from Samsung Mobile



-------- Original message --------
From: degski <degski@gmail.com>
Date: 24/06/2016 7:43 PM (GMT+05:30)
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Backend of multi_index container


On 24 June 2016 at 15:51, Anaswara Nair <anaswara.nn@gmail.com> wrote:
I have gone through LMDB. However AFAIK LMDB stores the data as a key-value pair.

Yes, it's a key-value store.
 
 Though duplicate keys are allowed, I couldn't find any relation between these entries. I couldn't understand its use as a database as well.

It's like std::(multi)map, maybe the wikipedia entry helps.
 
Can you provide some help so that I can go deeper into this.

In your original question, you refer to having one unique ID and some related data per record. Maybe you could expand a bit on what you would like to achieve.

degski