tags:

views:

57

answers:

1

My googlefu is lacking tonight and I can't find an answer to this.

Will databases I create on a amd64/emt64 system be usable on a x86 system?

+2  A: 

According to the FAQ:

Are Berkeley DB databases portable between architectures with different integer sizes and different byte orders?

Yes. Specifically, databases can be moved between 32- and 64-bit machines, as well as between little- and big-endian machines. See the "Selecting a byte order" section of the Berkeley DB Reference Guide for more information.

Brian Campbell
Excellent! Thanks.
Zoredache
I think the FAQ answer should have a caveat. The database files themselves are portable, however the data you store in a BDB database is only portable if you make it that way since BDB doesn't know the structure of the records being stored. For example, if you use integer keys, then you either need a custom comparison function or always store them in network byte order and translate to host byte order as needed.
joast