Berkeley DB Reference Guide:
Access Methods

PrevRefNext

Access method operations

Once a database handle has been created using db_create, there are several standard access method operations. Each of these operations is performed using a method referred to by the returned handle. Generally, the database will be opened using DB->open. If the database is from an old release of Berkeley DB, it may need to be upgraded to the current release before it is opened using DB->upgrade.

( db_create를 사용하여 디비핸들이 생성된후에는 여러 표준 액세스메소드를 사용할 수 있다.일반적으로 디비는  DB->open로 열리게 되는데 만약 이전버전의 버클리 디비의 디비파일인 경우는DB->upgrade로 열리기전에 업그레이드를 해야 한다. )

 

Once a database has been opened, records may be retrieved (DB->get), stored (DB->put), and deleted (DB->del).

(일단 디비가 열리면 레코드는 리크리브((DB->get),저장(DB->put),삭제(DB->del)될수있다.)

 

Additional operations supported by the database handle include statistics (DB->stat), truncation (DB->truncate), version upgrade (DB->upgrade), verification and salvage (DB->verify), flushing to a backing file (DB->sync), and association of secondary indices (DB->associate). Database handles are eventually closed using DB->close.

(추가적 오퍼레이션은 통계,트렁케이션,버전업그레이드,검증과 복구,backing파일 플러싱,세컨드 인덱스 연관등이 있다.디비핸들은 결과적으로  DB->close로 닫힌다.)

Databases and Related MethodsDescription
db_createCreate a database handle
DB->associateAssociate a secondary index
DB->closeClose a database
DB->cursorCreate a cursor handle
DB->delDelete items from a database
DB->errError message with error string
DB->errxError message
DB->fdReturn a file descriptor from a database
DB->getGet items from a database
DB->get_byteswappedReturn if the underlying database is in host order
DB->get_envReturn a handle for the underlying database environment
DB->get_typeReturn the database type
DB->joinPerform a database join on cursors
DB->key_rangeReturn estimate of key location
DB->openOpen a database
DB->pgetGet items from a database
DB->putStore items into a database
DB->removeRemove a database
DB->renameRename a database
DB->set_allocSet local space allocation functions
DB->set_append_recnoSet record append callback
DB->set_bt_compareSet a Btree comparison function
DB->set_bt_minkeySet the minimum number of keys per Btree page
DB->set_bt_prefixSet a Btree prefix comparison function
DB->set_cachesizeSet the database cache size
DB->set_dup_compareSet a duplicate comparison function
DB->set_encryptSet the database cryptographic key
DB->set_errcallSet error message callback
DB->set_errfileSet error message FILE
DB->set_errpfxSet error message prefix
DB->set_feedbackSet feedback callback
DB->set_flagsGeneral database configuration
DB->set_h_ffactorSet the Hash table density
DB->set_h_hashSet a hashing function
DB->set_h_nelemSet the Hash table size
DB->set_lorderSet the database byte order
DB->set_pagesizeSet the underlying database page size
DB->set_paniccallSet panic callback
DB->set_q_extentsizeSet Queue database extent size
DB->set_re_delimSet the variable-length record delimiter
DB->set_re_lenSet the fixed-length record length
DB->set_re_padSet the fixed-length record pad byte
DB->set_re_sourceSet the backing Recno text file
DB->statReturn database statistics
DB->syncFlush a database to stable storage
DB->truncateEmpty a database
DB->upgradeUpgrade a database
DB->verifyVerify/salvage a database

PrevRefNext

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.