only make db if attr is true