Refactor build database options.