Output builder with db