dbTalk Databases Forums  

Is there "Direct Access" in BDB?

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Is there "Direct Access" in BDB? in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
gibeon
 
Posts: n/a

Default Is there "Direct Access" in BDB? - 11-29-2005 , 04:27 AM






Hi,

I am a beginner in BDB. I wonder if there is a scheme to "Direct
Access" to the record stored in BDB?
I mean something like a pointer to the record or an address of the
record?

Gibeon.


Reply With Quote
  #2  
Old   
Ron
 
Posts: n/a

Default Re: Is there "Direct Access" in BDB? - 11-30-2005 , 06:44 AM






I think you are asking about direct access to records via key instead
of by cursor. Please expand on your question if that is not the case.

You should take a look at the DB->get method to fetch a record by key
or logical record number depending on the type of database access
(Btree, Hash, Record Number, Queue).

For more information:

http://sleepycat.com/docs/api_c/db_get.html

You can find a description of the various Database access types here:

http://www.sleepycat.com/docs/ref/am_conf/select.html
http://www.sleepycat.com/docs/api_c/frame.html

Ron


Reply With Quote
  #3  
Old   
xthorillon
 
Posts: n/a

Default Re: Is there "Direct Access" in BDB? - 12-01-2005 , 11:03 AM



I think u just would like to get the direct pointer to the real record
not a database copy ...

But for BDD i think it isn't possible, (they had to guarantee that
noone will corrupted the BDD address space (like an Object model the
data shoulda be private to the database and u just return a copy of
this record)

I had got the same problem in my project, i wouldn't want to make a
copy of a readonly database just a pointer to the record would be good
.....

So i had to manually load my own hash table for BDD and make a wrapper
around BDB to handle this situation.

Best regard


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.