Decoupled conditional and database builder logic