This class is the combination of std::multimap and hash_multimap.
By setting database handles as DB_BTREE or DB_HASH type respectively, you will be using an equivalent of std::multimap or hash_multimap respectively. Database(dbp) and environment(penv) handle requirement: The dbp handle must meet the following requirement: 1. Database type should be DB_BTREE or DB_HASH. 2. Either DB_DUP or DB_DUPSORT flag must be set. Note that so far Berkeley DB does not allow DB_DUPSORT be set and the database is storing identical key/data pairs, i.e. we can't store two (1, 2), (1, 2) pairs into a database D with DB_DUPSORT flag set, but only can do so with DB_DUP flag set; But we can store a (1, 2) pair and a (1, 3) pair into D with DB_DUPSORT flag set. So if your data set allows DB_DUPSORT flag, you should set it to gain a lot of performance promotion. 3. No DB_RECNUM flag set. 4. No DB_TRUNCATE specified in database open flags. 5. DB_THREAD must be set if you are sharing the database handle across multiple threads directly, or indirectly by sharing the container object across multiple threads.
The data data type. db_multimap stores key/data pairs.
Do not specify anything if ddt type is a class/struct type; Otherwise, specify ElementHolder<ddt> to it.
| Member | Description | 
|---|---|
| insert | Range insertion. | 
| erase | Erase elements by key. | 
| equal_range | Find the range within which all keys equal to specified key x. | 
| equal_range_N | Find equal range and number of key/data pairs in the range. | 
| count | Count the number of key/data pairs having specified key x. | 
| upper_bound | Find the least key greater than x. | 
| db_multimap | Constructor. | 
| ~db_multimap | |
| operator= | Container content assignment operator. | 
| swap | Swap content with another multimap container. | 
| operator== | Returns whether the two containers have identical content. | 
| operator!= | Container unequality comparison operator. | 
void insert(InputIterator first,
    InputIterator last)
 
          Range insertion.
Insert a range [first, last) of key/data pairs into this container.
void insert(const_iterator &first,
    const_iterator &last)
 
          Range insertion.
Insert a range [first, last) of key/data pairs into this container.
iterator insert(const value_type &x)
Insert a single key/data pair if the key is not in the container.