OONumerics User : |
From: Xiaowen Wang (swangken_at_[hidden])
Date: 2001-07-18 09:36:43
Michael Soliman writes:
> Moin Moin.
>
> Did anyone hear of a map<.,.,.,.>-implemantation, shadowing its data into
> a database [maybe by replacing the normal allocator-mechanism as to hand
> out the map's index-parameter as a parameter to the allocators.
The runtime complexity of a database update and a memory chunk
allocation is magnitude far apart, the former one typically involves
at least one network roundtrip unless you're using embedded
database plus some constraint check etc. Therefore it doesn't sound a
good idea to bundle them together at such fine grain even though
syntatically it can hide the dirty database work beneath.
If all you need is to update the database with the data in the map,
why not write a helper method/class to do the database work? That way,
all you need from the content side is an iterator of desired key and
value type of an associative container, which includes not only
map<...>, but a whole lot more. Note that you don't have to change any
existing container code. On the DB interface side, you can devise
some common interface expected of your application, and then provide
concrete impl for different DBMS or even other data persistence means
like a zip file.
Cheers
XW
> --------------------- Object Oriented Numerics List --------------------------
> * To subscribe/unsubscribe: use the handy web form at
> http://oonumerics.org/oon/
> * If this doesn't work, please send a note to owner-oon-list_at_[hidden]
--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list_at_[hidden]