![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
But I am wondering how to know if DB_BTREE file is an primary btree or a secondary btree file??? The documentation of Db.open() and Db.get_type() specifies only these 4 values and it would help to know as soon as possible the underlying type of the btree database. |
#3
| |||
| |||
|
|
In short: with Berkeley DB your application is supposed to know what it is doing. You understood right the problem . In effect, BerkeleyDB is expecting |
), there is no problem....But, according the
#4
| |||
| |||
|
|
Nevertheless, BerkeleyDB does know that a BTree file is a secondary since you got an exception if you insert a record in a secondary. |
#5
| |||
| |||
|
|
Since your application must impliment the call back function to associate the secondary index with the primary how does the user specify this to the application? It seems that the user needs to specify a significant amount of information properly to your application. It would be hard to verify that the call back function specified is the proper one. |
|
I think it would be more reliable if your program genenerated a description file of some sort that described the relationship among the databases and have the user pass the name of that file rather than the names of up to 253 secondaries. |
|
Nevertheless, BerkeleyDB does know that a BTree file is a secondary since you got an exception if you insert a record in a secondary. BerkeleyDB only knows this in the context of a running program that has called db->associate on the database. There is no information in the file. |
![]() |
| Thread Tools | |
| Display Modes | |
| |