This content has been marked as final. Show 3 replies
Hi Siri,1 person found this helpful
The data that is stored in the berkeley database is transparent to the BDB database code. In other words, there is nothing in the library that looks at the data portion to try and determine what it is or is not. For the data portion you are free to use whatever encoding you want because it is up to the application to interpret the data. For things like error messages and other types of displays that are returned from BDB, we use the ASCII character set.
Thanks for the response Mike.
Does that mean the application itself has to take care of converting strings to certain type of byte sequence to put in to the db and while retrieving it also its the application's responsibility to interpret the byte sequence ??
The BDB library does not interpret the user's data. This is the responsibilty of the application. If you are using BTREE access method you should make sure you understand you key values and should understand how they are handled with comparison function. BDB provides a default comparison function, and the application can define its own. If you want the keys sorted in a particular manner you should consider using your own comparison function. Detailed information is in the documentation.