[OpenSER-Devel] Re: [OpenSER-Users] New db_berkeley module
Henning Westerholt
henning.westerholt at 1und1.de
Thu Oct 11 09:33:09 CEST 2007
On Thursday 11 October 2007, William Quan wrote:
> I was poking around and I don't think the Berkeley DB has indexes like
> we're used to in relational databases (or if they do they are not
> exposed via api).
>
> So basically each Berkeley DB maps to a SQL 'table'. The 'rows' are
> mapped to key/value pairs in the bdb, and 'columns' are
> application-encapsulated fields that the module needs to manipulate.
> Conceptually its like a big hash table, where you need to know the key
> for the query to find a row. Because of this, I did not include the ID
> column in the tables, as its the auto incremented column that relational
> db would use for an index, not something that is ordinarily provided in
> a query by the application. I did not see your xslt file, but could we
> modify it to not include the id columns for the berkeleydb stuff?
Hello William,
the 'id' column is currently not used from the openser server, but this is
planned for further releases. For that reason we also include the id field to
the dbtext tables, this db is from the concept somewhat like the berkeley_db
module.
We also had a some real pain in the past to support different db tables for
all the modules, so i really would like use the same table for this module
too. If this its possible with dbtext, it should be possible with
db_berkeley, too. :-)
BTW, the xml source is in db/schema, the xsl scripts are in doc/dbschema/xsl.
> I use this module for registration so that involves the modules auth_db,
> registrar, and usrloc. These modules use primarily tables subscriber and
> location.
> This stuff has been working for a while, but due to the key definition
> of the subscriber and location tables, it does require you to set
> use_domain=1 in the script.
> I also tested tables acc and version, but the rest remain to be tested.
So, its ok if i set the METADATA_KEY field e.g. for subscriber to
0 1 2 (id, username, domain)? What happens if i don't set the use_domain
parameter?
> I should have some more code in the next few days.
Great!
Best regards,
Henning
More information about the Devel
mailing list