Refactor database recipe